private void LoadDeptUIData()
    {
        ddlDept.Items.Clear();
        List <Department> depts = empAuth.GetDepartmentListToSelect();

        if (depts != null)
        {
            ddlDept.DataTextField  = "DeptName";
            ddlDept.DataValueField = "DeptId";
            ddlDept.DataSource     = depts;
            ddlDept.DataBind();
        }
    }
示例#2
0
    private void LoadDeptUIData()
    {
        ddlDept.Items.Clear();
        List <Department> depts = empAuth.GetDepartmentListToSelect();

        if (depts != null)
        {
            ddlDept.DataTextField  = "DeptName";
            ddlDept.DataValueField = "DeptId";
            ddlDept.DataSource     = depts;
            ddlDept.DataBind();
        }

        ddlDept.Items.Insert(0, new ListItem(Resources.Lang.SearchOption_All, "0"));
    }