Beispiel #1
0
        static void TransInBusiness(BusinessAcc account)
        {
            if (account != null)
            {
                string transactSel;
                Console.Write(MessageForTransIn(account.Balance));
                transactSel = Console.ReadLine().ToLower();
                switch (transactSel)
                {
                case "d":
                    DepositBusiness(account);
                    break;

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

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

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

            SelectedCustomer.Business.Add(busAcc);
            Console.WriteLine(CongratulationNewAccount(busAcc.AccountNum));
        }
Beispiel #3
0
        static BusinessAcc FindBusinessAcc(int accNum)
        {
            BusinessAcc account = null;

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