Exemplo n.º 1
0
        private void AuthenticateUser()
        {
            Clear();
            _screen.DisplayMessageLine("Please enter your account number: ");
            int accountNumber = _keypad.GetInput();

            _screen.DisplayMessageLine("Enter your PIN: ");
            int pinCode = _keypad.GetInput();

            _userAuthenticated = _bankDatabase.AuthenticateUser(accountNumber, pinCode);
            if (_userAuthenticated)
            {
                _currentAccountNumber = accountNumber; // Provide access to account if authentication is correct.
            }
            else
            {
                _screen.DisplayMessageLine("Invalid account number or PIN. Please try again. "); // Try again if the authentication is incorrect.
            }
            Sleep(3000);
        }
Exemplo n.º 2
0
        void AuthenticateUser()
        {
            Clear();
            screen.DisplayMessageLine("Please enter your account number: ");
            int accountNumber = keypad.GetInput();

            screen.DisplayMessageLine("Enter your PIN: ");
            int pinCode = keypad.GetInput();

            userAuthenticated = bankDatabase.AuthenticateUser(accountNumber, pinCode);
            if (userAuthenticated)
            {
                currentAccountNumber = accountNumber;                    // Kimlik doğrulaması doğru ise hesaba erişim sağla.
            }
            else
            {
                screen.DisplayMessageLine("Invalid account number or PIN. Please try again. "); //Kimlik doğrulaması yanlış ise tekrar dene.
            }
            Sleep(2000);
        }