public static void Start() { FileAccountRepository fileRepo = new FileAccountRepository(); List <Account> accounts = fileRepo.GetAllAccounts(); while (true) { Console.Clear(); Console.WriteLine("SG Bank Application"); Console.WriteLine("________________________"); Console.WriteLine("1. Lookup an Account"); Console.WriteLine("2. Deposit"); Console.WriteLine("3. Withdraw"); Console.WriteLine("\nQ to quit"); Console.WriteLine("\nEnter selection"); string userinput = Console.ReadLine(); switch (userinput) { case "1": AccountLookupWorkflow lookupWorkflow = new AccountLookupWorkflow(); lookupWorkflow.Execute(); break; case "2": DepositWorkflow depositWorkflow = new DepositWorkflow(); depositWorkflow.Execute(); fileRepo.SaveAllAccounts(accounts); break; case "3": WithdrawWorkflow withdrawWorkflow = new WithdrawWorkflow(); withdrawWorkflow.Execute(); fileRepo.SaveAllAccounts(accounts); break; case "Q": return; } } }
public static void start() { Boolean keepBoolingAround = true; while (keepBoolingAround) { Console.Clear(); Console.WriteLine("JCL Bank Application"); Console.WriteLine("---------------------------"); Console.WriteLine("1. Lookup an Account"); Console.WriteLine("2. Deposit"); Console.WriteLine("3. Withdraw"); Console.WriteLine("---------------------------"); Console.WriteLine("\nQ to quit"); Console.WriteLine("\nEnter selection: "); string userinput = Console.ReadLine(); switch (userinput) { case "1": AccountLookupWorkflow lookupWorkflow = new AccountLookupWorkflow(); lookupWorkflow.Execute(); break; case "2": DepositWorkflow depositWorkflow = new DepositWorkflow(); depositWorkflow.Execute(); break; case "3": WithdrawWorkflow withdrawWorkflow = new WithdrawWorkflow(); withdrawWorkflow.Execute(); break; case "Q": keepBoolingAround = false; break; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("SG Bank Application "); Console.WriteLine("----------------------"); Console.WriteLine("1. Lookup an Account"); Console.WriteLine("2. Deposit"); Console.WriteLine("3. Withdraw"); Console.WriteLine("\nQ to quit"); Console.WriteLine("\nEnter Selection:"); string userinput = Console.ReadLine(); switch (userinput) { case "1": AccountLookupWorkflow LookupWorkFlow = new AccountLookupWorkflow(); LookupWorkFlow.Execute(); break; case "2": DepositWorkflow depositWorkflow = new DepositWorkflow(); depositWorkflow.Execute(); break; case "3": WithdrawWorkFlow WithdrawWorkflow = new WithdrawWorkFlow(); WithdrawWorkflow.Execute(); break; case "Q": return; default: Console.WriteLine("That's not a selection"); break; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("Bank Application"); Console.WriteLine("--------------------------------------------"); Console.WriteLine("1. Lookup an Account"); Console.WriteLine("2. Deposit"); Console.WriteLine("3. Withdraw"); Console.WriteLine("\nQ to quit"); Console.Write("\nEnter selection: "); string userinput = Console.ReadLine(); switch (userinput) { case "1": AccountLookupWorkflow lookupWF = new AccountLookupWorkflow(); lookupWF.Execute(); break; case "2": DepositWorkflow depositWF = new DepositWorkflow(); depositWF.Execute(); break; case "3": break; case "Q": return; } } }