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"); } }
static void OpenBusinessAcc() { var busAcc = new BusinessAcc() { Customer_Id = SelectedCustomer.Id, Customer = SelectedCustomer }; SelectedCustomer.Business.Add(busAcc); Console.WriteLine(CongratulationNewAccount(busAcc.AccountNum)); }
static BusinessAcc FindBusinessAcc(int accNum) { BusinessAcc account = null; foreach (var acc in SelectedCustomer.Business) { if (acc.AccountNum == accNum && acc.IsActive) { account = acc; } } return(account); }