コード例 #1
0
 public void search()
 {
     try
     {
         BALItem lcls = new BALItem();
         List <GetItemSummaryReport_Result> list = new List <GetItemSummaryReport_Result>();
         if (rditem.Checked == true)
         {
             drpitemcategory.ClearSelection();
             rditemid.Enabled = true;
         }
         foreach (ListItem lst in drpitemcategory.Items)
         {
             if (lst.Selected && drpitemcategory.SelectedValue != "All")
             {
                 SB.Append(lst.Value + ',');
             }
         }
         if (SB.ToString() != "")
         {
             lcls.CategorylistID = SB.ToString().Substring(0, (SB.Length - 1));
         }
         SB.Clear();
         if (txtSearchItem.Text != "")
         {
             lcls.ItemID = Convert.ToInt64(txtSearchItem.Text);
         }
         if (textsearchdesc.Text != "")
         {
             lcls.ItemDescription = textsearchdesc.Text;
         }
         lcls.IsStrActive = reactive.SelectedValue;
         lcls.LoggedinBy  = defaultPage.UserId;
         lcls.Filter      = "";
         List <GetItemSummaryReport_Result> lstcol = lclsservice.GetItemSummaryReport(lcls).ToList();
         //lblrowcount.Text = "No of records : " + lstcol.Count.ToString();
         grditem.DataSource = lstcol;
         grditem.DataBind();
     }
     catch (Exception ex)
     {
         EventLogger log = new EventLogger(config);
         log.LogException(ex);
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.MedicalSuppliesErrorMessage.Replace("<<Itemname>>", ex.Message), true);
     }
 }