protected DataTable getItems(int grpCatId) { try { IAdmin getItems = new AdminItems(); DataTable itemDT = getItems.getItems(grpCatId); return(itemDT); } catch (Exception iExp) { grpMsgLbl.Text = "Error Occured" + iExp.Message; return(null); } }
private void getItems(int grpCatId) { try { IAdmin getItems = new AdminItems(); DataTable itemDT = getItems.getItems(grpCatId); if (itemDT != null) { itemGrid.DataSource = itemDT; itemGrid.DataBind(); } else { grpMsgLbl.Text = HardCodedValues.BuddaResource.ItemsNull; itemGrid.DataSource = null; itemGrid.DataBind(); } } catch (Exception iExp) { grpMsgLbl.Text = HardCodedValues.BuddaResource.CatchBlockError + iExp.Message; } }
protected void getItems(int grpCatId) { try { IAdmin getItems = new AdminItems(); DataTable itemDT = getItems.getItems(grpCatId); if (itemDT != null) { itemGrid.DataSource = itemDT; itemGrid.DataBind(); } else { lbl_status.Text = "No Data for items! change the catagory"; itemGrid.DataSource = null; itemGrid.DataBind(); } } catch (Exception iExp) { lbl_status.Text = "Error Occured: " + iExp.Message; } }