Beispiel #1
0
        /* __ */
        static void TransInChecking(CheckingAcc account)
        {
            if (account != null)
            {
                string transactSel;
                Console.Write(MessageForTransIn(account.Balance));
                transactSel = Console.ReadLine().ToLower();
                switch (transactSel)
                {
                case "d":
                    DepositChecking(account);
                    break;

                case "w":
                    WithdrawFromChecking(account);
                    break;

                case "t":
                    ViewTransaction(account);
                    break;

                default:
                    Console.WriteLine("Invalid Input");
                    break;
                }
                return;
            }
            else
            {
                Console.WriteLine("\n\tNo Checking Account");
            }
        }
Beispiel #2
0
        static void OpenCheckingAcc()
        {
            var checkAcc = new CheckingAcc()
            {
                Customer_Id = SelectedCustomer.Id,
                Customer    = SelectedCustomer
            };

            SelectedCustomer.Checking.Add(checkAcc);
            Console.WriteLine(CongratulationNewAccount(checkAcc.AccountNum));
        }
Beispiel #3
0
        static CheckingAcc FindCheckingAcc(int accNum)
        {
            CheckingAcc account = null;

            foreach (var acc in SelectedCustomer.Checking)
            {
                if (acc.AccountNum == accNum && acc.IsActive)
                {
                    account = acc;
                }
            }
            return(account);
        }