예제 #1
0
 //Show all the item in the grid
 public void ShowAllItem()
 {
     try
     {
         DataTable dtItemShowAll = itemBLLObj.BLLShowAllItem();
         gvItem.DataSource = dtItemShowAll;
         gvItem.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 private void BindItem()
 {
     try
     {
         DataTable dtItemShowAll = itemBLLObj.BLLShowAllItem();
         ddlSelectItem.DataSource     = dtItemShowAll;
         ddlSelectItem.DataTextField  = "itemName";
         ddlSelectItem.DataValueField = "itemId";
         ddlSelectItem.DataBind();
         ddlSelectItem.Items.Add("---Select---");
         ddlSelectItem.SelectedIndex = ddlSelectItem.Items.Count - 1;
         ddlSelectItem.Items[ddlSelectItem.Items.Count - 1].Value = "";
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }