private void searchDT(string itemname, int catid) { try { IAdmin searchitemname = new AdminItems(); DataTable searchitemDT = searchitemname.SearchItems(itemname, catid); if (searchitemDT != null) { itemGrid.DataSource = searchitemDT; itemGrid.DataBind(); grpMsgLbl.Text = ""; } else { grpMsgLbl.Text = HardCodedValues.BuddaResource.NoItemError; itemGrid.DataSource = null; itemGrid.DataBind(); } } catch (Exception iExp) { grpMsgLbl.Text = HardCodedValues.BuddaResource.CatchBlockError + iExp.Message; } }
protected void searchDT(string itemname) { try { IAdmin searchitemname = new AdminItems(); DataTable searchitemDT = searchitemname.SearchItems(itemname); if (searchitemDT != null) { itemGrid.DataSource = searchitemDT; itemGrid.DataBind(); lbl_status.Text = ""; } else { lbl_status.Text = "No Items Found, Enter Existing Item Name"; itemGrid.DataSource = null; itemGrid.DataBind(); } } catch (Exception iExp) { lbl_status.Text = "Error Occured: " + iExp.Message; } }