private static void ProcessChoice(string choice, Account account) { switch (choice) { case "1": DepositWorkflow depositWorkflow = new DepositWorkflow(); depositWorkflow.Execute(account); break; case "2": WithdrawWorkflow withdrawWorkflow = new WithdrawWorkflow(); withdrawWorkflow.Execute(account); break; } }
private void ProcessChoice(string choice) { switch (choice) { case "1": var depositWF = new DepositWorkflow(); depositWF.Execute(_currentAccount); break; case "2": var withdrawWF = new WithdrawWorkflow(); withdrawWF.Execute(_currentAccount); break; case "3": var transferWF = new TransferWorkflow(); Console.WriteLine("Enter the account number to transfer to: "); GetTransferAccount(Int32.Parse(Console.ReadLine())); transferWF.Execute(_currentAccount, _toTransferToAccout); break; } }
public void ProcessChoice(string Choice) { switch (Choice) { case "1": var depositWF = new DepositWorkflow(); depositWF.Execute(_currentAccount); break; case "2": WithdrawWorkflow wwf = new WithdrawWorkflow(); wwf.Execute(_currentAccount); break; case "3": Console.WriteLine("This feature is not implemented!"); Console.WriteLine("Press Enter to continue..."); Console.ReadLine(); break; default: Console.WriteLine("Invalid Entry..."); Console.WriteLine("Press Enter to continue..."); Console.ReadLine(); break; } PrintAccountInformation(_currentAccount); }