/// <summary> /// writes the individual line out to the file as a CSV /// </summary> /// <param name="customerData">List of string values associated with each customer from the database.</param> private static void writeCIFFile(Customer customerData) { string output; output = ""; for (int j = 0; j < CSVFields.Count; j++) { if (CSVFields[j] == "Account Number") { output = output + customerData.getAccountNumber() + customerData.getDelimiter() + customerData.getStatementNumber().ToString("000") + ","; } else if (CSVFields[j] == "Due Date") { output = output + customerData.getDueDate() + ","; } else if (CSVFields[j] == "Amount Due"){ output = output + customerData.getAmountDue() + ","; } //This is a test block for adding Paperless Billing // else if (CSVFields[j] == "Paperless") // { // output = output + customerData.getPaperless() + ","; // } else { output = output + ","; } } outputFile.WriteLine(output); //Console.WriteLine(output); }