private void Merge_unreconciled_data <TThirdPartyType, TOwnedType>( ISpreadsheet spreadsheet, ICSVFile <TOwnedType> pending_file, DataLoadingInformation <TThirdPartyType, TOwnedType> data_loading_info) where TThirdPartyType : ICSVRecord, new() where TOwnedType : ICSVRecord, new() { _input_output.Output_line("Merging unreconciled rows from spreadsheet with pending and budget data..."); spreadsheet.Add_unreconciled_rows_to_csv_file <TOwnedType>(data_loading_info.Sheet_name, pending_file); _input_output.Output_line("Copying merged data (from pending, unreconciled, and budgeting) into main 'owned' csv file..."); pending_file.Update_source_lines_for_output(data_loading_info.Loading_separator); pending_file.Write_to_file_as_source_lines(data_loading_info.File_paths.Owned_file_name); _input_output.Output_line("..."); }
public void Merge_bespoke_data_with_pending_file( IInputOutput input_output, ISpreadsheet spreadsheet, ICSVFile <BankRecord> pending_file, BudgetingMonths budgeting_months, DataLoadingInformation <ActualBankRecord, BankRecord> data_loading_info) { input_output.Output_line(ReconConsts.Loading_expenses); _expected_income_csv_file.Load(false); spreadsheet.Add_unreconciled_rows_to_csv_file <ExpectedIncomeRecord>(MainSheetNames.Expected_in, _expected_income_file.File); _expected_income_csv_file.Populate_source_records_from_records(); _expected_income_file.Filter_for_employer_expenses_and_bank_transactions_only(); _expected_income_file.Copy_to_pending_file(pending_file); _expected_income_csv_file.Populate_records_from_original_file_load(); }