예제 #1
0
        private static void ShowAccount()
        {
            var accountNbr      = CaptureInput();
            var accounts        = JsonBank.ReadAccounts();
            var matchedAccounts = accounts.Where(acc => acc.Number.ToString() == accountNbr);

            if (!matchedAccounts.Any())
            {
                Console.WriteLine("The account number does not exist!");
                Console.Write("Press Enter to return to Main Menu");
                Console.ReadLine();
                return;
            }

            PrintAccountsTable(matchedAccounts);
        }
예제 #2
0
        private static void ShowAccounts()
        {
            var accounts = JsonBank.ReadAccounts();

            PrintAccountsTable(accounts);
        }