public static List <Security> Parse_Securities_From_CSV(List <string[]> csvData, Account account) { // Get the column headers from the csv data List <string> headerValues = CSVMethods.Get_Header_Values(csvData); // Load the information for positions in an account for (int csvRow = 1; csvRow < csvData.Count; csvRow++) { if (csvData[csvRow].Contains(account.ID)) { account.Securities.Add(Get_Position_From_CSV_Row(csvData[csvRow], headerValues)); } } return(account.Securities); }
private static List <Household> Parse_Households_From_CSV_Data(List <string[]> csvData) { // Get the column headers from the csv data List <string> headerValues = CSVMethods.Get_Header_Values(csvData); // Instantiate the household list to return List <Household> householdList = new List <Household>(); // Parse the account data from each row, starting from index 1, since 0 is the header line for (int csvRow = 1; csvRow < csvData.Count; csvRow++) { householdList.Add(Get_Account_From_Row(csvData[csvRow], headerValues)); } // Return the list return(householdList); }