public void Execute()
        {
            Console.Clear();
            int accountNumber = UserPrompts.GetIntFromUser("Enter the account number that you would like to delete: ");

            DisplayAccountInformation(accountNumber);
        }
Esempio n. 2
0
        public void Execute()
        {
            //TODO: Create a heading here so I can console.clear
            Console.ForegroundColor = ConsoleColor.White;
            int accountNumber = UserPrompts.GetIntFromUser("Please provide an account number: ");

            DisplayAccountInformation(accountNumber);
        }
        private Account GetDataForNewAccount()
        {
            Account newAccount = new Account();

            int newAccountNumberInt = GenerateNewRandomAccountNumber();

            newAccount.AccountNumber = newAccountNumberInt;

            newAccount.Name = UserPrompts.GetStringFromUser("Please enter a name for the new account.");

            newAccount.Balance = UserPrompts.GetDecimalFromUser("Starting deposit: ");

            newAccount.Type =
                (AccountType)
                UserPrompts.GetIntFromUser("Please enter an acct type \n1 for Free, 2 for Basic, 3 for Premium");

            return(newAccount);
        }
Esempio n. 4
0
        public void Execute(Account currentAccount, decimal amount)
        {
            Console.Clear();
            DisplayHeading();
            int transferAccountNumber = UserPrompts.GetIntFromUser("Please enter the account number you would like to transfer to.");

            var transferAccount = new AccountManager();

            var transferToAccount = transferAccount.GetAccount(transferAccountNumber);

            if (transferToAccount.Success)
            {
                Account MoveThatMoneyAcct = new Account();

                MoveThatMoneyAcct = transferToAccount.Data;

                WithdrawlWorkflow transferFrom = new WithdrawlWorkflow();

                transferFrom.Execute(currentAccount, "Please enter an amount to transfer.", true, MoveThatMoneyAcct);

                Console.WriteLine($"You successfully transfered money to {MoveThatMoneyAcct.Name}");
            }
        }
Esempio n. 5
0
        public void Execute()
        {
            int accountNumber = UserPrompts.GetIntFromUser("Please provide account number: ");

            DisplayAccountInformation(accountNumber);
        }