protected void ButtonSearch_Click(object sender, ImageClickEventArgs e) { string collStatusSrchCond = ""; string instTypeSrchCond = ""; string productTypeSrchCond = ""; int userTypeId = (int)Session[MtbBillCollection.Global.Definitions.SessionVariable.Value.UserTypeId]; string branchCode = (cboBranchWise.Checked == true) ? cboBranch.SelectedValue : ""; PrepareSrchCond(ref collStatusSrchCond, ref instTypeSrchCond, ref productTypeSrchCond); DataTable dt = _bilCollectionManager.GetCollectionList(Convert.ToInt32(ClientList.SelectedValue), txtFromDate.Text, txtToDate.Text, collStatusSrchCond, instTypeSrchCond, productTypeSrchCond, userTypeId, branchCode); //this.programmaticModalPopup.Show(); dt.TableName = "Collection"; if (dt.Rows.Count < 1) { gridCollList.DataSource = null; txtConfirmation.Text = "No data found."; //ShowPopup(true,true,"No data found"); } else { gridCollList.DataSource = dt; } gridCollList.DataBind(); }
protected void ButtonSearch_Click(object sender, ImageClickEventArgs e) { string collStatusSrchCond = ""; string instTypeSrchCond = ""; string productTypeSrchCond = ""; PrepareSrchCond(ref collStatusSrchCond, ref instTypeSrchCond, ref productTypeSrchCond); _crystalReport = new ReportDocument(); _crystalReport.Load(Server.MapPath("~/Reports/rptCollectionStatment.rpt")); int userTypeId = int.Parse(Session[MtbBillCollection.Global.Definitions.SessionVariable.Value.UserTypeId].ToString()); string branchCode = (String)Session[MtbBillCollection.Global.Definitions.SessionVariable.Value.BranchCode]; DataTable rptTable = _bilCollectionManager.GetCollectionList(Convert.ToInt32(ClientList.SelectedValue), txtFromDate.Text, txtToDate.Text, collStatusSrchCond, instTypeSrchCond, productTypeSrchCond, userTypeId, branchCode); //this.programmaticModalPopup.Show(); rptTable.TableName = "CollectionStatement"; if (rptTable.Rows.Count == 0) { ShowPopup(true, true, "No data available."); CrystalReportViewer1.ReportSource = null; CrystalReportViewer1.RefreshReport(); } else { _crystalReport.SetDataSource(rptTable); Session.Add(MtbBillCollection.Global.Definitions.SessionVariable.Value.CollectionReport, rptTable); CrystalReportViewer1.ReportSource = _crystalReport; CrystalReportViewer1.RefreshReport(); } }