using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
/// <summary>
/// Summary description for Batch
/// </summary>
public class Batch
{
public Batch()
{
//
// TODO: Add constructor logic here
//
}
public List<string> batches = new List<string> {
"BATCH-KA-17090-DB", "BATCH-AP-16597-DB",
"BATCH-AP-17829", "BATCH-KA-17478-DB",
"BATCH-KA-17481-DB", "BATCH-KA-17477-DB",
"BATCH-KA-17479-DB", "BATCH-AP-17678-DB",
"BATCH-JK-17673-DB", "BATCH-JK-17558-DB",
"BATCH-JK-17672-DB", "BATCH-JK-17671-DB",
"BATCH-UP-18060", "BATCH-JK-16405",
"BATCH-TS-17177", "BATCH-AP-17195",
"BATCH-KA-17485-DB", "BATCH-UP-16421",
"BATCH-KA-17487-DB", "BATCH-KA-17484-DB",
"BATCH-KA-16399-DB", "BATCH-KA-16372-DB",
"BATCH-KA-16295-DB", "BATCH-KA-16389-DB",
"BATCH-JK-17499-DB", "BATCH-JK-17500-DB",
"BATCH-JK-17497-DB", "BATCH-JK-17498-DB",
"BATCH-KA-17486-DB", "BATCH-KA-17212",
"BATCH-AP-16038", "BATCH-KA-16236-DB",
"BATCH-AP-16457", "BATCH-KA-16368",
"BATCH-KA-17307", "BATCH-KA-17308",
"BATCH-KA-16466-DB", "BATCH-KA-16107-DB",
"BATCH-KA-17207", "BATCH-KA-17306",
"BATCH-JK-17300-DB", "BATCH-KA-16388-DB",
"BATCH-KA-16400-DB", "BATCH-KA-16084-DB",
"BATCH-KA-16110-DB", "BATCH-KA-16076-DB",
"BATCH-KA-16369", "BATCH-KA-16364-DB",
"BATCH-KA-16363-DB", "BATCH-KA-16339-DB",
"BATCH-KA-16014-DB", "BATCH-UP-18007",
"BATCH-KA-16280-DB", "BATCH-KA-16662-DB",
"BATCH-KA-16663-DB", "BATCH-KA-16661-DB",
"BATCH-KA-16271", "BATCH-KA-16356-DB",
"BATCH-KA-15443", "BATCH-KA-15637-DB",
"BATCH-KA-15636-DB", "BATCH-KA-15633-DB",
"BATCH-KA-15634-DB", "BATCH-KA-15635-DB",
"BATCH-KA-16080-DB", "BATCH-KA-16345-DB",
"BATCH-KA-16193-DB", "BATCH-KA-16194-DB",
"BATCH-KA-16176-DB", "BATCH-KA-15800-DB",
"BATCH-KA-15806-DB", "BATCH-KA-15803-DB",
"BATCH-KA-15941", "BATCH-KA-15943",
"BATCH-KA-15940", "BATCH-KA-15942",
"BATCH-KA-16416", "BATCH-KA-16365-DB",
"BATCH-KA-15457", "BATCH-KA-15458",
"BATCH-KA-15455", "BATCH-KA-15459",
"BATCH-KA-15569", "BATCH-KA-15568",
"BATCH-TS-15247-DB", "BATCH-UP-14876-DB",
"BATCH-UP-14875-DB", "BATCH-AP-15709",
"BATCH-TS-14792", "BATCH-TS-14790",
"BATCH-TS-14791", "BATCH-UK-14819",
"BATCH-KA-14641", "BATCH-KA-14640",
"BATCH-TS-14746", "BATCH-TS-14747",
"BATCH-KA-14623", "BATCH-KA-14637",
"BATCH-TS-14671", "BATCH-TS-14673",
"BATCH-KA-14621", "BATCH-KA-14622",
"BATCH-KA-14638", "BATCH-KA-14575",
"BATCH-KA-14618", "BATCH-KA-14619",
"BATCH-KA-14616", "BATCH-KA-14615",
"BATCH-KA-14620", "BATCH-KA-14636",
"BATCH-KA-14639", "BATCH-KA-14624",
"BATCH-UK-14727", "BATCH-KA-14677",
"BATCH-KA-14678", "BATCH-UK-14726",
"BATCH-KA-14675", "BATCH-KA-14676",
"BATCH-KA-14573", "BATCH-UK-14729",
"BATCH-UK-14730", "BATCH-KA-14740",
"BATCH-KA-14744", "BATCH-KA-14741",
"BATCH-KA-14742", "BATCH-KA-14743",
"BATCH-KA-14745", "BATCH-AP-14731",
"BATCH-UK-14626", "BATCH-UK-14627",
"BATCH-KA-14610", "BATCH-KA-14609",
"BATCH-UK-14629", "BATCH-UK-14628",
"BATCH-UP-13950", "BATCH-UP-13952",
"BATCH-UP-13951", "BATCH-UP-13953",
"BATCH-JK-13842", "BATCH-JK-13841",
"BATCH-JK-13843", "BATCH-JK-13865",
"BATCH-JK-13700", "BATCH-JK-13699",
"BATCH-JK-13886", "BATCH-JK-13815",
"BATCH-JK-13727", "BATCH-JK-13646",
"BATCH-JK-13756", "BATCH-JK-13690",
"BATCH-JK-13647", "BATCH-JK-13729"
};
}
--------------------------
protected void DDL_Batch_OnSelectedIndexChanged(object sender, EventArgs e)
{
Batch b = new Batch();
if(b.batches.Contains(DDL_Batch.SelectedItem.Text))
{
DDL_Status.Enabled = false;
}
else
{
DDL_Status.Enabled = true;
BindGrid();
}
//btn_Reset_Click(this, e);
}
--------------------------
reference:- https://www.tutorialsteacher.com/csharp/csharp-list
No comments:
Post a Comment