Example #1
0
        public void filldesignation(int dp)
        {
            bus.id = dp;
            DataTable dt1 = bus.fetchdesignation();

            ddldesi.DataSource = dt1;
            ddldesi.DataBind();
            ddldesi.Items.Insert(0, new ListItem("-----SELECT-----", ""));
            ddldesi.Items.FindByValue(dt.Rows[0][6].ToString()).Selected = true;
        }
Example #2
0
        public static List <Desi> filldesi(int dep)
        {
            List <Desi>     des = new List <Desi>();
            bus_eleave_ugc1 bus = new bus_eleave_ugc1();

            bus.id = dep;
            DataTable dt = bus.fetchdesignation();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                Desi _Desi = new Desi();
                _Desi.dsg_id      = int.Parse(dt.Rows[i]["dsg_id"].ToString());
                _Desi.designation = dt.Rows[i]["designation"].ToString();
                des.Add(_Desi);
            }
            return(des);
        }