Пример #1
0
        public void AuthenticateUser()
        {
            screen.DisplayMessage("\nP lease enter account number");
            int AccountNumber = keypad.GetInput();

            screen.DisplayMessage("\n Please enter your pin");
            int Pin = keypad.GetInput();

            userAuthenticated = bankDatabase.authenticateUser(AccountNumber, Pin);
            if (!userAuthenticated)
            {
                currentAccountNumber = AccountNumber;
            }
        }
Пример #2
0
        public int displayMenu()
        {
            int choose = 0;

            int[] amount = { 20, 40, 60, 80 };
            while (choose == 0)
            {
                UserScreen.DisplayMessage("Menu\n");
                UserScreen.DisplayMessage("1.$20\n\n");
                UserScreen.DisplayMessage("2.$40\n\n");
                UserScreen.DisplayMessage("3.$60\n\n");
                UserScreen.DisplayMessage("4.$80\n\n");
                UserScreen.DisplayMessage("Choose a withdrawal amount");
                int temp = keypad.GetInput();
                switch (temp)
                {
                case 1:
                case 2:
                case 3:
                case 4:
                    choose = amount[temp];
                    break;

                case 6:
                    choose = CANCELED;
                    break;

                default:
                    UserScreen.DisplayMessage("Its not example. Please try again");
                    break;
                }
            }
            return(choose);
        }
Пример #3
0
        private decimal PrompForDepositAmount()
        {
            UserScreen.DisplayMessageLine("\n please input a deposit amount in Cents");
            int input = keypad.GetInput();

            if (input == CANCELED)
            {
                return(CANCELED);
            }
            else
            {
                return(input);
            }
        }