public void BindGrid() { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } _reportBO = new Bill_Sys_ReportBO(); try { ArrayList arrlst = new ArrayList(); arrlst.Add(txtCompanyID.Text); arrlst.Add(txtFromDate.Text); arrlst.Add(txtToDate.Text); arrlst.Add(txtPatientName.Text); arrlst.Add(txtCaseNo.Text); // arrlst.Add(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID); arrlst.Add(txtChkFromDate.Text); arrlst.Add(txtChkToDate.Text); arrlst.Add(txtChkNumber.Text); arrlst.Add(txtChkAmount.Text); DataSet ds = new DataSet(); ds = _reportBO.GetMiscPaymentDetails(arrlst); grdPayment.DataSource = ds; grdPayment.DataBind(); grdExcelMiscPayment.DataSource = ds; grdExcelMiscPayment.DataBind(); Session["Excelgrid"] = ds; if (ds.Tables[0].Rows.Count > 0) { SumCheckAmount(); } else { lblChkAmountvalue.Visible = false; lblChkAmount.Visible = false; } } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }