//Return processed data to be input un xls file private static HashSet <FinancialReport> GenerateReportData( List <string> vendors, Dictionary <string, decimal> vendorsIncomes, Dictionary <string, decimal> vendorsExpenses, Dictionary <string, decimal> vendorsTaxes) { var vendorsReport = new HashSet <FinancialReport>(); foreach (var vendor in vendors) { var incomes = vendorsIncomes.FirstOrDefault(v => v.Key == vendor); var expenses = vendorsExpenses.FirstOrDefault(v => v.Key == vendor); var taxes = vendorsTaxes.FirstOrDefault(v => v.Key == vendor); var vendorReport = new FinancialReport { Vendor = vendor, Incomes = incomes.Value, Expenses = expenses.Value, TotalTaxes = taxes.Value }; vendorsReport.Add(vendorReport); } return(vendorsReport); }
//Return processed data to be input un xls file private static HashSet<FinancialReport> GenerateReportData( List<string> vendors, Dictionary<string, decimal> vendorsIncomes, Dictionary<string, decimal> vendorsExpenses, Dictionary<string, decimal> vendorsTaxes) { var vendorsReport = new HashSet<FinancialReport>(); foreach (var vendor in vendors) { var incomes = vendorsIncomes.FirstOrDefault(v => v.Key == vendor); var expenses = vendorsExpenses.FirstOrDefault(v => v.Key == vendor); var taxes = vendorsTaxes.FirstOrDefault(v => v.Key == vendor); var vendorReport = new FinancialReport { Vendor = vendor, Incomes = incomes.Value, Expenses = expenses.Value, TotalTaxes = taxes.Value }; vendorsReport.Add(vendorReport); } return vendorsReport; }