private async Task <Stream> GetEstimateReportPdfStreamAsync(IRepairEstimateDataSource estimate, IEnumerable <IRepairEstimateLineItemsDataSource> estimateLineItems) { var rds = new ReportDataSource { Name = "RepairEstimate", Value = new List <IRepairEstimateDataSource> { estimate } }; if (!estimateLineItems.Any()) { estimateLineItems = new List <IRepairEstimateLineItemsDataSource>() { new RepairEstimateLineItemsDataSource() { TypeOfScan = "<No Estimated Scans>", EstimateAmount = 0 } }; } var li = new ReportDataSource { Name = "EstimateLineItems", Value = estimateLineItems }; return(await GenerateStream.ReportToPdfAsync(EstimateReport, new[] { rds, li })); }
private async Task <Stream> GetInvoiceReportPdfStreamAsync(IRepairInvoiceDataSource invoice, IEnumerable <IRepairInvoiceLineItemsDataSource> invoiceLineItems) { var rds = new ReportDataSource { Name = "RepairInvoice", Value = new List <IRepairInvoiceDataSource> { invoice } }; if (!invoiceLineItems.Any()) { invoiceLineItems = new List <IRepairInvoiceLineItemsDataSource>() { new RepairInvoiceLineItemsDataSource() { WorkPerfomed = "<No Invoiced Scans>", InvoiceAmount = 0 } }; } var li = new ReportDataSource { Name = "LineItems", Value = invoiceLineItems }; return(await GenerateStream.ReportToPdfAsync(InvoiceReport, new[] { rds, li })); }
private async Task <Stream> GetScanReportPdfStreamAsync(IScanReportDataSource dataSource) { var rds = new ReportDataSource { Name = "ScanReportDataSource", Value = new List <IScanReportDataSource>() { dataSource } }; return(await GenerateStream.ReportToPdfAsync(ScanReport, new[] { rds })); }
private async Task <Stream> GetStatementReportPfdStreamAsync(IStatementDataSource statement, IEnumerable <IStatementLineItemsDataSource> statementLineItems) { var rds = new ReportDataSource { Name = "Statement", Value = new List <IStatementDataSource>() { statement } }; var li = new ReportDataSource { Name = "InvoiceLineItems", Value = statementLineItems }; return(await GenerateStream.ReportToPdfAsync(StatementReport, new[] { rds, li })); }