public StatementReport(ManagementDetails managementDetails, PurchaserDetails purchaserDetails, IList <StatementReportRecord> records, ICalendar calendar, Date dateAsAt, string title, string viewIDValue) : base(calendar, "Statement", purchaserDetails.ClientName) { ArgumentChecker.ThrowIfNull(managementDetails, "managementDetails"); ArgumentChecker.ThrowIfNull(records, "records"); this.managementDetails = managementDetails; this.purchaserDetails = purchaserDetails; this.records = records; this.dateAsAt = dateAsAt; this.title = title; this.viewID = viewIDValue; ageingBalances = new AgeingBalances(records); }
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; } }
public StatementReport Build(ManagementDetails managementDetails, PurchaserDetails purchaserDetails, IList <StatementReportRecord> records, ICalendar calendar, Date endDate, string title) { return(new StatementReport(managementDetails, purchaserDetails, records, calendar, endDate, title, QueryString.ViewIDValue)); }