예제 #1
0
 private void BindBranch()
 {
     try
     {
         ddlBranch.Items.Clear();
         DataSet objDs = _objBalUser.GetAllBranchs();
         if (objDs.Tables[0].Rows.Count > 0)
         {
             ddlBranch.DataSource     = objDs;
             ddlBranch.DataValueField = "BranchId";
             ddlBranch.DataTextField  = "BranchName";
             ddlBranch.DataBind();
             ddlBranch.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All", "0"));
         }
         else
         {
             ddlBranch.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All", "0"));
         }
     }
     catch
     {
         throw;
     }
 }