Ejemplo n.º 1
0
        private void ProccesChoice(string choice)
        {
            switch (choice)
            {
            case "1":
                DisplayOrdersWorkFlow dowf = new DisplayOrdersWorkFlow(_oops);
                dowf.Execute();
                break;

            case "2":
                AddOrderWorkFlow aowf = new AddOrderWorkFlow(_oops);
                aowf.Execute();
                break;

            case "3":
                EditOrderWorkFlow eowf = new EditOrderWorkFlow(_oops);
                eowf.Execute();
                break;

            case "4":
                RemoveOrderWorkFlow rowf = new RemoveOrderWorkFlow(_oops);
                rowf.Execute();
                break;

            case "":
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine();
                Console.WriteLine("You must enter an option.");
                Console.WriteLine("Press ENTER to continue...");
                Console.ResetColor();
                Console.ReadLine();
                break;

            default:
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine();
                Console.WriteLine("{0} is an invalid entry!", choice);
                Console.WriteLine("Press enter to continue...");
                Console.ResetColor();
                Console.ReadLine();
                break;
            }
        }
Ejemplo n.º 2
0
 private void ProccesChoice(string choice)
 {
     switch (choice)
     {
         case "1":
             DisplayOrdersWorkFlow dowf = new DisplayOrdersWorkFlow(_oops);
             dowf.Execute();
             break;
         case "2":
             AddOrderWorkFlow aowf = new AddOrderWorkFlow(_oops);
             aowf.Execute();
             break;
         case "3":
             EditOrderWorkFlow eowf = new EditOrderWorkFlow(_oops);
             eowf.Execute();
             break;
         case "4":
             RemoveOrderWorkFlow rowf = new RemoveOrderWorkFlow(_oops);
             rowf.Execute();
             break;
         case "":
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine();
             Console.WriteLine("You must enter an option.");
             Console.WriteLine("Press ENTER to continue...");
             Console.ResetColor();
             Console.ReadLine();
             break;
         default:
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine();
             Console.WriteLine("{0} is an invalid entry!", choice);
             Console.WriteLine("Press enter to continue...");
             Console.ResetColor();
             Console.ReadLine();
             break;
     }
 }