Exemple #1
0
        protected void GetDesignation(int DeptId)
        {
            Designationtbl desg = new Designationtbl();

            desg.IsActive     = 1;
            desg.DepartmentId = DeptId;
            //lstdesg = objDesignationBL.GetDesignationWithDepartment(desg).ToList();
            lstdesg = objDesignationBL.GetDesignationByDepIsActive(desg).ToList();
            DDLDesignation.Items.Clear();
            DDLDesignation.Items.Add(new ListItem("--Select--", "0"));
            foreach (var em in lstdesg)
            {
                //DDLDesignation.Items.Add(new ListItem(em.DesignationName, em.DesignationId.ToString()));
                ListItem li = new ListItem();
                li.Text  = em.DesignationName;
                li.Value = em.DesignationId.ToString();
                DDLDesignation.Items.Add(li);
            }
        }
        protected void GetDesignation(int dept)
        {
            List <Designationtbl> lstDesignation   = new List <Designationtbl>();
            Designationtbl        dsgt             = new Designationtbl();
            DesignationBL         objDesignationBL = new DesignationBL();

            dsgt.IsActive     = 1;
            dsgt.DepartmentId = dept;
            lstDesignation    = objDesignationBL.GetDesignationByDepIsActive(dsgt).ToList();
            DDLDesignation.Items.Clear();
            DDLDesignation.Items.Add(new ListItem("--Select--", "0"));
            foreach (var cnt in lstDesignation)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.DesignationName;
                li.Value = cnt.DesignationId.ToString();
                DDLDesignation.Items.Add(li);
            }
        }