Пример #1
0
 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();
             lbl_status.Text = "";
         }
         else
         {
             lbl_status.Text = HardCodedValues.BuddaResource.NoItemError;
             itemGrid.DataSource = null;
             itemGrid.DataBind();
         }
     }
     catch (Exception iExp)
     {
         lbl_status.Text = HardCodedValues.BuddaResource.CatchBlockError  + iExp.Message;
     }
 }
Пример #2
0
 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;
     }
 }