public StatementReport CreateReport() { StatementReport statementReport = _reportBuilder.CreateReport(this); var listaExtraseReport = CreateReportBindingList(_listaExtrase); statementReport.BindReportData(listaExtraseReport); return(statementReport); }
public void ShowReport(StatementReport report) { if (report != null) { this.DateViewedLiteral.Text = report.DateViewed.ToDateTimeString(); ViewState.Add("StatementReport", report); stReportPanel.ShowReport(report); } }
public DummyStatementReport(BankTransactionEventStore eventStore) { /* * For now you could remove the exception and come back to this later * although it may not allow you much progress at some point depending * on how you tackle the problems }:-} */ throw new Exception("Read me! :-D"); report = new StatementReport(eventStore); }
protected void Page_Load(object sender, EventArgs e) { StatementReport report = SessionWrapper.Instance.Get.PrintBag as StatementReport; if (report != null) { Title = report.Title; reportTitleLiteral.Text = report.Title; reportPanel.ShowReport(report); } }
public void ShowReport(StatementReport report) { //ac = false; if (report != null) { ManagementDetails managementDetails = report.ManagementDetails; accountNameLiteral.Text = managementDetails.Name; bankAndBranchLiteral.Text = managementDetails.BankDetails.NameAndBranch; accountNumberLiteral.Text = accountNumberLiteralTwo.Text = managementDetails.BankDetails.AccountNumber; PurchaserDetails purchaserDetails = report.PurchaserDetails; customerNameLiteral.Text = purchaserDetails.Name; customerAddressOneLiteral.Text = purchaserDetails.Address.AddressOne; customerAddressTwoLiteral.Text = purchaserDetails.Address.AddressTwo; customerAddressThreeLiteral.Text = purchaserDetails.Address.AddressThree; customerAddressFourLiteral.Text = purchaserDetails.Address.AddressFour; customerIdLiteral.Text = purchaserDetails.Id.ToString(); referenceLiteral.Text = referenceLiteralTwo.Text = referenceLiteralThree.Text = purchaserDetails.Reference; configureGridColumns(); cffGGV_StatementGridView.DataSource = report.Records; cffGGV_StatementGridView.DataBind(); AgeingBalances ageingBalances = report.AgeingBalances; threeMonthsOrOverLiteral.Text = ageingBalances.ThreeMonthsAndOver.ToString("C"); twoMonthsLiteral.Text = ageingBalances.TwoMonthAgeing.ToString("C"); oneMonthLiteral.Text = ageingBalances.OneMonthAgeing.ToString("C"); currentLiteral.Text = ageingBalances.Current.ToString("C"); balanceLiteral.Text = ageingBalances.Balance.ToString("C"); //Summary managementNameLiteral.Text = managementDetails.Name; managementAddressOneLiteral.Text = managementDetails.Address.AddressOne; managementAddressTwoLiteral.Text = managementDetails.Address.AddressTwo; managementAddressThreeLiteral.Text = managementDetails.Address.AddressThree; managementAddressFourLiteral.Text = managementDetails.Address.AddressFour; customerNameLiteral2.Text = purchaserDetails.Name; customerNumberLiteral.Text = purchaserDetails.Number.ToString(); monthEndingLiteral.Text = report.MonthEnding.ToString(); clientNameLiteral.Text = purchaserDetails.ClientName; } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += ApplicationOnThreadException; AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUhandledException; var mainForm = new MainForm(); IStatementReport statementReport = new StatementReport(); IStatementFormFactory statementFormFactory = new StatementFormFactory(); IExtrasParserFactory extrasParserFactory = new ExtrasParserFactory(); IStatementFormPresenterFactory statementFormPresenterFactory = new StatementFormPresenterFactory(); IDialogService dialogService = new DialogService(); IMainFormPresenterFactory mainFormPresenterFactory = new MainFormPresenterFactory(); IReportBuilder reportBuilder = new ReportBuilder(); var mainFormPresenter = mainFormPresenterFactory.Create(mainForm, statementFormFactory, statementFormPresenterFactory, dialogService, extrasParserFactory, reportBuilder); Application.Run(mainForm); void CurrentDomainOnUhandledException(object sender, UnhandledExceptionEventArgs e) { var mesaj = String.Format("A avut loc o eroare!\r\n" + "{0}\r\n", ((Exception)e.ExceptionObject).Message); Console.WriteLine("Error {0}: {1}", DateTimeOffset.Now, (Exception)e.ExceptionObject); MessageBox.Show(mesaj, "Eroare neasteptata"); } void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e) { var mesaj = String.Format("A avut loc o eroare!\r\n" + "{0}\r\n", e.Exception.Message); Console.WriteLine("Error {0}: {1}", DateTimeOffset.Now, e.Exception); MessageBox.Show(mesaj, "Eroare neasteptata"); } }