Esempio n. 1
0
        private static void chooseAccounts()
        {
            if (theLedgerRepository == null)
            {
                theLedgerRepository = new LedgerRepository(fileLocation, myList, false);
            }
            displayAccountsScreen();
            bool keepRunning = true;

            while (keepRunning)
            {
                string theInputValue = Console.ReadLine();
                switch (theInputValue)
                {
                case "1":
                case "2":
                case "3":
                    string theacct = theInputValue;
                    Account.Menu(theLedgerRepository, theInputValue);
                    break;

                case "4":
                    keepRunning = false;
                    break;

                default:
                    theErrorMessage = "Please enter a valid account number.";
                    break;
                }
                displayAccountsScreen();
            }
        }
Esempio n. 2
0
        public static void Menu(LedgerRepository aLedgerRepository, string theAccountNumber)
        {
            accountNumber       = theAccountNumber;
            theLedgerRepository = aLedgerRepository;
            displayOptionsScreen();
            bool keepRunning = true;

            while (keepRunning)
            {
                string theInputValue = Console.ReadLine();
                switch (theInputValue)
                {
                case "1":
                    runAddDepositWithdrawalScreen(true);
                    break;

                case "2":
                    runAddDepositWithdrawalScreen(false);
                    break;

                case "3":
                    runCheckBalanceScreen();
                    break;

                case "4":
                    keepRunning = false;
                    break;

                default:
                    theErrorMessage = "Please enter a valid menu option.";
                    break;
                }
                displayOptionsScreen();
            }
        }
Esempio n. 3
0
 private static void firstTime()
 {
     init();
     theLedgerRepository = new LedgerRepository(fileLocation, myList, true);
     theErrorMessage     = "Everything has been initialized.";
 }