Esempio n. 1
0
 private void ProcessChoice(string choice)
 {
     switch (choice)
     {
         case "1":
             DisplayOrderWorkflow dowf = new DisplayOrderWorkflow();
             dowf.Execute();
             Console.ReadLine();
             break;
         case "2":
             AddOrderWorkflow aowf = new AddOrderWorkflow();
             aowf.Execute();
             Console.ReadLine();
             break;
         case "3":
            EditOrderWorkflow eowf = new EditOrderWorkflow();
             eowf.Execute();
             Console.ReadLine();
             break;
         case "4":
            RemoveOrderWorkflow rowf = new RemoveOrderWorkflow();
             rowf.Execute();
             Console.ReadLine();
             break;
        default:
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine("\t{0} is an invalid entry!", choice);
             Console.WriteLine("\tPress enter to continue...");
             Console.ReadLine();
             break;
     }
 }
Esempio n. 2
0
        private void ProcessChoice(string choice)
        {
            switch (choice)
            {
                case "1":
                    DisplayOrdersWorkflow displaying = new DisplayOrdersWorkflow();
                    displaying.Execute();
                    break;
                case "2":
                    AddOrderWorkflow adding = new AddOrderWorkflow();
                    adding.Execute();
                    break;
                case "3":
                    EditOrderWorkflow editing = new EditOrderWorkflow();
                    editing.Execute();
                    break;

                case "4":
                     RemoveOrderWorkFlow removing = new RemoveOrderWorkFlow();
                    removing.Execute();
                    break;
            }
        }