Exemple #1
0
 private void BindProvince()
 {
     try
     {
         DataSet objDs = _objBalUser.GetProvince();
         if (objDs.Tables[0].Rows.Count > 0)
         {
             ddlProvince.DataSource     = objDs;
             ddlProvince.DataValueField = "ProvinceId";
             ddlProvince.DataTextField  = "ProvinceName";
             ddlProvince.DataBind();
             ddlProvince.Items.Insert(0, new ListItem("Select", "0"));
         }
         else
         {
             ddlProvince.Items.Insert(0, new ListItem("Select", "0"));
         }
     }
     catch (Exception ex)
     {
         labelError.Text = _objBOUtiltiy.ShowMessage("danger", "Error", ex.Message);
     }
 }