public void ShowCustMoneyBalanceReport() { _branchId = GlobalVariableBO._branchId; SummeryReportBAL summeryReportBal = new SummeryReportBAL(); DataTable dtCustMoneybalance = new DataTable(); crCustTodayMoneyBalance crCustMoneyBalance = new crCustTodayMoneyBalance(); CustMoneyBalanceViewer custMoneyBalance = new CustMoneyBalanceViewer(); //dtCustMoneybalance = summeryReportBal.GetCustMoneyBalance(GlobalVariableBO._currentServerDate); dtCustMoneybalance = summeryReportBal.GetCustMoneyBalance(); _filterdColumnName = dtCustMoneybalance.Columns[0].ToString(); RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtCustMoneybalance, _filterdColumnName, ResourceName.Todays_Summery_Report_Money_Balance); dtCustMoneybalance = obj.GetRecordLevelFilteredData(); crCustMoneyBalance.SetDataSource(dtCustMoneybalance); ///// Load Company Name GetCommonInfo(); ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ///// Load Branch Name ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtPrintDate"]).Text = GlobalVariableBO._currentServerDate.ToString("dd-MMM-yyyy"); custMoneyBalance.crvCustMoneyBalanceReportViewer.ReportSource = crCustMoneyBalance; custMoneyBalance.Show(); }
private void btn_TodayCustMoneyBalance_Click(object sender, EventArgs e) { try { if (txt_Reason.Text == string.Empty) { MessageBox.Show("You Should Writed Down The Reason"); return; } _branchId = GlobalVariableBO._branchId; Admin_Alternative_Report_Bal summeryReportBal = new Admin_Alternative_Report_Bal(); DataTable dtCustMoneybalance = new DataTable(); crCustTodayMoneyBalance crCustMoneyBalance = new crCustTodayMoneyBalance(); CustMoneyBalanceViewer custMoneyBalance = new CustMoneyBalanceViewer(); //dtCustMoneybalance = summeryReportBal.GetCustMoneyBalance(GlobalVariableBO._currentServerDate); dtCustMoneybalance = summeryReportBal.GetCustMoneyBalance(dtp_TodayBalanceDate.Value); _filterdColumnName = dtCustMoneybalance.Columns[0].ToString(); RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtCustMoneybalance, _filterdColumnName, ResourceName.Todays_Summery_Report_Money_Balance); dtCustMoneybalance = obj.GetRecordLevelFilteredData(); crCustMoneyBalance.SetDataSource(dtCustMoneybalance); ///// Load Company Name GetCommonInfo(); ReportName = "TodayCustomerMoneyBalance"; ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ///// Load Branch Name ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; ((TextObject)crCustMoneyBalance.ReportDefinition.Sections[2].ReportObjects["txtPrintDate"]).Text = dtp_TodayBalanceDate.Value.ToString("dd-MMM-yyyy");; custMoneyBalance.crvCustMoneyBalanceReportViewer.ReportSource = crCustMoneyBalance; custMoneyBalance.Show(); InsertLog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }