Beispiel #1
0
        public void ProcessLetters(string csvFilePath, string letterTemplateFilePath, string outputFolderPath)
        {
            if (!fileProcessor.FileExists(csvFilePath) ||
                !fileProcessor.FileExists(letterTemplateFilePath))
            {
                Console.WriteLine("Input files not available");
                return;
            }

            IEnumerable <Customer> customers = fileProcessor.ReadCSVFile(csvFilePath);

            if (!customers.Any())
            {
                Console.WriteLine("No records in the file.");
                return;
            }

            foreach (Customer customer in customers)
            {
                ProcessCustomer(customer, letterTemplateFilePath, outputFolderPath);
            }
        }