Esempio n. 1
0
 private void LoadTree()
 {
     try
     {
         string    DeptCode     = "CHG";
         DataTable dtDepartment = objCP.GetFolderId(DeptCode, GetSessionUserID());
         if (dtDepartment.Rows.Count > 0)
         {
             btnAdd.Visible               = true;
             ddlDepartment.DataSource     = dtDepartment;
             ddlDepartment.DataTextField  = dtDepartment.Columns[1].ToString();
             ddlDepartment.DataValueField = dtDepartment.Columns[0].ToString();
             ddlDepartment.DataBind();
             ddlDepartment.Items.Insert(0, "--Select--");
         }
         else
         {
             btnAdd.Visible = false;
         }
     }
     catch
     {
     }
 }