} // BuildTrafficReport public ATag BuildMarketingChannelsSummaryReport(Report report, DateTime from, DateTime to, List <string> oColumnTypes = null) { var rpt = new MarketingChannelsSummary.MarketingChannelsSummary(DB, this); KeyValuePair <ReportQuery, DataTable> oData = rpt.Run(report, from, to); ATag oBody = new Body().Add <Class>("Body") .Append(new H1().Append(new Text(report.GetTitle(from, oToDate: to)))) .Append(new P().Append(TableReport(oData.Key, oData.Value, oColumnTypes: oColumnTypes))); if (from.Date.AddDays(1) == to.Date) { for (int i = 0; i < 6; i++) { from = from.AddDays(-1); to = to.AddDays(-1); oData = rpt.Run(report, from, to); oBody .Append(new H1().Append(new Text(report.GetTitle(from, oToDate: to)))) .Append(new P().Append(TableReport(oData.Key, oData.Value, oColumnTypes: oColumnTypes))); } // for } // if return(oBody); } // BuildMarketingChannelsSummaryReport
} // BuildUiExtXls public ExcelPackage BuildTrafficReportXls(Report report, DateTime from, DateTime to) { var trafficReport = new TrafficReport(DB, this); KeyValuePair <ReportQuery, DataTable> oData = trafficReport.CreateTrafficReport(report, from, to); return(AddSheetToExcel(oData.Value, report.GetTitle(from, oToDate: to), report.Title)); } // BuildTrafficReportXls
} // BuildLoanIntegrityReport public ATag BuildLoansIssuedReport(Report report, DateTime today, DateTime tomorrow, List <string> oColumnTypes = null) { KeyValuePair <ReportQuery, DataTable> pair = CreateLoansIssuedReport(report, today, tomorrow); return(new Body().Add <Class>("Body") .Append(new H1().Append(new Text(report.GetTitle(today, oToDate: tomorrow)))) .Append(new P().Append(TableReport(pair.Key, pair.Value, oColumnTypes: oColumnTypes)))); } // BuildLoansIssuedReport
public ATag BuildStrategyRunningTimeReport(Report report, DateTime today, DateTime tomorrow, List <string> oColumnTypes = null) { StrategyRunningTime.StrategyRunningTime rpt = new StrategyRunningTime.StrategyRunningTime(DB, this); KeyValuePair <ReportQuery, DataTable> oData = rpt.Run(report, today, tomorrow); return(new Body().Add <Class>("Body") .Append(new H1().Append(new Text(report.GetTitle(today, oToDate: tomorrow)))) .Append(new P().Append(TableReport(oData.Key, oData.Value, oColumnTypes: oColumnTypes)))); } // BuildStrategyRunningTimeReport
} // TableReport public ATag BuildTrafficReport(Report report, DateTime from, DateTime to, List <string> oColumnTypes = null) { var trafficReport = new TrafficReport(DB, this); KeyValuePair <ReportQuery, DataTable> oData = trafficReport.CreateTrafficReport(report, from, to); return(new Body().Add <Class>("Body") .Append(new H1().Append(new Text(report.GetTitle(from, oToDate: to)))) .Append(new P().Append(TableReport(oData.Key, oData.Value, oColumnTypes: oColumnTypes)))); } // BuildTrafficReport
} // BuildTrafficReportXls public ExcelPackage BuildMarketingChannelsSummaryXls(Report report, DateTime from, DateTime to) { var rpt = new MarketingChannelsSummary.MarketingChannelsSummary(DB, this); KeyValuePair <ReportQuery, DataTable> oData = rpt.Run(report, from, to); ExcelPackage wb = AddSheetToExcel(oData.Value, report.GetTitle(from, oToDate: to), report.Title); if (from.Date.AddDays(1) == to.Date) { for (int i = 1; i < 7; i++) { from = from.AddDays(-1); to = to.AddDays(-1); oData = rpt.Run(report, from, to); wb = AddSheetToExcel(oData.Value, report.GetTitle(from, oToDate: to), i + " day" + (i == 1 ? "" : "s") + " before", report.Title, wb: wb); } // for } // if return(wb); } // BuildMarketingChannelsSummarXls
} // BuildUiXls public ExcelPackage BuildUiExtXls(Report report, DateTime today, DateTime tomorrow) { KeyValuePair <ReportQuery, DataTable> oData = CreateUiExtReport(report, today, tomorrow); return(AddSheetToExcel(oData.Value, report.GetTitle(today, oToDate: tomorrow), "RptUiExtReport")); } // BuildUiExtXls
} // BuildUiExtReport public ExcelPackage BuildLoansIssuedXls(Report report, DateTime today, DateTime tomorrow) { KeyValuePair <ReportQuery, DataTable> pair = CreateLoansIssuedReport(report, today, tomorrow); return(AddSheetToExcel(pair.Value, report.GetTitle(today, oToDate: tomorrow), "RptLoansIssued")); } // BuildLoansIssuedXls