public void ShowBuySellReport() { _transDate = Convert.ToDateTime(dtTransactionDate.Value.ToShortDateString()); _branchId = GlobalVariableBO._branchId; SellShareListReviewBAL sellShareListReviewBal = new SellShareListReviewBAL(); DataTable dtBuySellNetAmntReview = new DataTable(); crBuySellNetAmnt crBuySellNetamnt = new crBuySellNetAmnt(); BuySellNetAmntReportViewer buySellNetAmntViewer = new BuySellNetAmntReportViewer(); dtBuySellNetAmntReview = sellShareListReviewBal.GetBuySellNetAmnt(_transDate); crBuySellNetamnt.SetDataSource(dtBuySellNetAmntReview); GetCommonInfo(); ((TextObject)crBuySellNetamnt.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ((TextObject)crBuySellNetamnt.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; if (_transDate != null) { ((TextObject)crBuySellNetamnt.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Transaction Date: " + _transDate.ToString("dd-MMMM-yyyy"); } buySellNetAmntViewer.crvBuySellNetAmnt.ReportSource = crBuySellNetamnt; buySellNetAmntViewer.Show(); }
public void ShowSellReport() { _branchId = GlobalVariableBO._branchId; _transDate = Convert.ToDateTime(dtTransactionDate.Value.ToShortDateString()); _CustWise = rdoCustwise.Checked; _InstruWise = rdoInstruWise.Checked; SellShareListReviewBAL sellShareListReviewBal = new SellShareListReviewBAL(); DataTable dtSellShareListReview = new DataTable(); if (_CustWise) { crCustWiseSellShareList crSellShareListReview = new crCustWiseSellShareList(); CustWiseSellShareListReportViewer sellShareListReportViewer = new CustWiseSellShareListReportViewer(); dtSellShareListReview = sellShareListReviewBal.GetCustWiseSellShareList(_transDate); _filterdColumnName = dtSellShareListReview.Columns[0].ToString(); RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtSellShareListReview, _filterdColumnName, ResourceName.Buy_Sale_Report_Cust_Wise_Buy_Share_List); dtSellShareListReview = obj.GetRecordLevelFilteredData(); crSellShareListReview.SetDataSource(dtSellShareListReview); GetCommonInfo(); ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; if (_transDate != null) { ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Transaction Date: " + _transDate.ToString("dd-MMM-yy"); } sellShareListReportViewer.crvSellShareList.ReportSource = crSellShareListReview; sellShareListReportViewer.Show(); } else if (_InstruWise) { crInstruWiseSellShareList crInstruWiseSellSharelist = new crInstruWiseSellShareList(); InstruWiseSellReportViewer insWiseSellReport = new InstruWiseSellReportViewer(); dtSellShareListReview = sellShareListReviewBal.GetInstruWiseSellShareList(_transDate); _filterdColumnName = dtSellShareListReview.Columns[2].ToString(); RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtSellShareListReview, _filterdColumnName, ResourceName.Buy_Sale_Report_Cust_Wise_Buy_Share_List); dtSellShareListReview = obj.GetRecordLevelFilteredData(); crInstruWiseSellSharelist.SetDataSource(dtSellShareListReview); GetCommonInfo(); ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; if (_transDate != null) { ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Transaction Date: " + _transDate.ToString("dd-MMM-yy"); } insWiseSellReport.crvInstruWiseSellReportViewer.ReportSource = crInstruWiseSellSharelist; insWiseSellReport.Show(); } else { MessageBox.Show("Please Select the report category first."); } }