private void GetBranchName() { try { BranchManagementBAL objBranchManagement = new BranchManagementBAL(); groupBox1.Text = "Payment Review of " + objBranchManagement.GetBranchName(); label1.Text = "Branch: " + objBranchManagement.GetBranchName(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ReportView() { try { CompanyBAL objCompanyBal = new CompanyBAL(); PaymentReviewBAL paymentBAL = new PaymentReviewBAL(); DataTable dtPaymentReview = new DataTable(); crPaymentReview1 crPayment = new crPaymentReview1(); frmPaymenrReportViewer paymentViewer = new frmPaymenrReportViewer(); LoadCommonInfo CmmInfo = new LoadCommonInfo(); BranchManagementBAL objBranchManagement = new BranchManagementBAL(); dtPaymentReview = paymentBAL.GneratePaymentReviewByBranchWise(dtpFromDate.Value, dtpToDate.Value); //_filterdColumnName = dtPaymentReview.Columns[1].ToString(); //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.Branch_wise_Payment_Review); //dtPaymentReview = obj.GetRecordLevelFilteredData(); crPayment.SetDataSource(dtPaymentReview); ///// Load Company Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName(); ///// Load Branch Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = objCompanyBal.GetHeadofficeInfo(); ////Load Date ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Review Duration: " + dtpFromDate.Value.ToString("dd-MM-yyyy") + " " + dtpToDate.Value.ToString("dd-MM-yyyy"); ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranch"]).Text = "Branch : " + objBranchManagement.GetBranchName(); paymentViewer.crvPaymentReview.ReportSource = crPayment; paymentViewer.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }