Пример #1
0
        private Account RetrieveAccountByNumber(string accountNumber)
        {
            var ops      = new AccountOperations();
            var response = ops.GetAccount(accountNumber);

            if (response.Success)
            {
                return(response.AccountInfo);
            }
            //Account account;
            else
            {
                Console.WriteLine("Error Occurred.");
                Console.WriteLine(response.Message);
                Console.WriteLine("Press enter to continue.");
                Console.ReadLine();
            }

            return(null);
        }
Пример #2
0
        public bool DisplayTargetAccountInfo(int AccountNumber)
        {
            var ops      = new AccountOperations();
            var response = ops.GetAccount(AccountNumber);

            if (response.Success)
            {
                _targetAccount = response.AccountInfo;
                Console.WriteLine("We will be transfering money to {0} {1} with Account Number {2} and a current balance of {3}.", _targetAccount.FirstName, _targetAccount.LastName, _targetAccount.AccountNumber, _targetAccount.Balance);
                Console.WriteLine("Press Enter to continue...");
                Console.ReadLine();
                return(true);
            }
            else
            {
                Console.WriteLine("Error Occurred!!");
                Console.WriteLine("This account does not exist.");
                Console.WriteLine("Press Enter to continue...");
                Console.ReadLine();
                return(false);
            }
        }
Пример #3
0
        public void DisplayAccountInformation(int AccountNumber)
        {
            var ops      = new AccountOperations();
            var response = ops.GetAccount(AccountNumber);


            if (response.Success)
            {
                _currentAccount = response.AccountInfo;

                PrintAccountInformation(response.AccountInfo);
                Console.ReadLine();

                DisplayAccountMenu();
            }
            else
            {
                Console.WriteLine("Error Occurred!!!");
                Console.WriteLine(response.Message);
                Console.WriteLine("Press Enter to continue...");
                Console.ReadLine();
            }
        }
Пример #4
0
 public Account GetAccount(int accountId)
 {
     return(AccountOperations.GetAccount(accountId));
 }