Example #1
0
        public static void Start()
        {
            bool userExit = false;

            while(!userExit)
            { 
                
            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.Write("\nEnter selection: ");

                string userInput = Console.ReadLine();

                switch(userInput.ToUpper())
                {
                    case "1":
                        AccountLookupWorkflow lookupWorkflow = new AccountLookupWorkflow();
                        lookupWorkflow.Execute();
                        break;

                    case "2":
                        AccountDepositWorkflow depositWorkflow = new AccountDepositWorkflow();
                        depositWorkflow.Execute();
                        break;

                    case "3":
                        AccountWithdrawWorkflow withdrawWorkflow = new AccountWithdrawWorkflow();
                        withdrawWorkflow.Execute();
                        break;

                    case "Q":
                        userExit = true;
                        break;
                }
            }
        }
Example #2
0
        internal static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("SGBank Application");
                Console.WriteLine("================================");
                Console.WriteLine("1. Lookup 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 accountLookupWorkflow = new AccountLookupWorkflow();
                    accountLookupWorkflow.Execute();
                    break;

                case "2":
                    AccountDepositWorkflow accountDepositWorkflow = new AccountDepositWorkflow();
                    accountDepositWorkflow.Exicute();
                    break;

                case "3":
                    AccountWithdrawWorkflow accountWithdrawWorkflow = new AccountWithdrawWorkflow();
                    accountWithdrawWorkflow.Exicute();
                    break;

                case "Q":
                    return;
                }
            }
        }