Example #1
0
        static void CustomerReports(Customer customer)
        {
            var isReporting = true;

            while (isReporting)
            {
                userView.WelcomeScreen(ReportMessage);
                var input = Console.ReadLine();
                switch (input.ToUpper())
                {
                case "A":
                    foreach (var account in customer.Accounts)
                    {
                        _customerService.PopulateAccount(account);
                        Console.WriteLine($"Balance for {account.Type} {account.AccountName} is {account.AvailableBalance().ToString("C")}");
                    }
                    break;

                case "C":
                    var firstAccount = new Account();
                    userView.CheckingTransactionDates(_customerService, customer, firstAccount);
                    break;

                case "S":
                    var secondAccount = new Account();
                    userView.CheckingTransactionDates(_customerService, customer, secondAccount);
                    break;

                case "X":
                    isReporting = false;
                    break;

                default:
                    Console.WriteLine("Unrecognized option");
                    break;
                }
            }
        }