public void OperationSelection(string choice) { switch (choice) { case "1": DisplayOrderWorkFlow searchOrder = new DisplayOrderWorkFlow(); searchOrder.Execute(); break; case "2": AddWorkFlow addOrderWorkFlow = new AddWorkFlow(); addOrderWorkFlow.Execute(); break; case "3": EditOrderWorkFlow editOrder = new EditOrderWorkFlow(); editOrder.Execute(); break; case "4": RemoveOrderWorkFlow removeOrder = new RemoveOrderWorkFlow(); removeOrder.Execute(); break; default: Console.WriteLine(); Console.WriteLine("{0} is not a valid choice.", choice); Console.WriteLine("Press ENTER to continue."); Console.ReadLine(); break; } }
private static void ProcessUserChoice(string userInput) { // string userInput = Console.ReadLine(); switch (userInput) { case "1": //display var d = new DisplayOrdersWorkFlow(); d.Execute(); break; case "2": //add an order var ao = new AddOrderWorkFlow(); ao.Execute(); break; case "3": //edit an order var eo = new EditOrderWorkFlow(); eo.Execute(); break; case "4": //remove an order var r = new RemoveOrderWorkFlow(); r.Execute(); break; case "Q": Console.Clear(); Console.WriteLine("\n\nGood Bye!"); break; } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("SG Flooring Program"); Console.WriteLine("___________________________"); Console.WriteLine("1. Display an Order"); Console.WriteLine("2. Add an Order"); Console.WriteLine("3. Edit an Order"); Console.WriteLine("4. Remove an Order"); Console.WriteLine("\n Q to quit"); Console.Write("\n Enter your selection here: "); string UserInput = Console.ReadLine(); switch (UserInput) { case "1": DisplayOrderWorkFlow displayOrderWorkFlow = new DisplayOrderWorkFlow(); displayOrderWorkFlow.Execute(); Console.ReadLine(); break; case "2": AddOrderWorkFlow addOrderWorkFlow = new AddOrderWorkFlow(); addOrderWorkFlow.Execute(); Console.ReadLine(); break; case "3": EditOrderWorkFlow editOrderWorkFlow = new EditOrderWorkFlow(); editOrderWorkFlow.Execute(); Console.ReadLine(); break; case "4": RemoveOrderWorkFlow removeOrderWorkFlow = new RemoveOrderWorkFlow(); removeOrderWorkFlow.Execute(); Console.ReadLine(); break; case "Q": return; default: Console.Write("That is not a valid entry."); Console.ReadLine(); break; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("***********************************"); Console.WriteLine("* Flooring Program"); Console.WriteLine("*"); Console.WriteLine("* 1. Display Orders"); Console.WriteLine("* 2. Add Order"); Console.WriteLine("* 3. Edit Order "); Console.WriteLine("* 4. Remove Order "); Console.WriteLine("* 5. Quit "); Console.WriteLine("*"); Console.WriteLine("***********************************"); Console.Write("\nEnter Selection: "); string userInput = Console.ReadLine(); switch (userInput) { case "1": DisplayOrderWorkFlow displayOrder = new DisplayOrderWorkFlow(); displayOrder.Execute(); break; case "2": AddOrderWorkFlow addOrder = new AddOrderWorkFlow(); addOrder.Execute(); break; case "3": EditOrderWorkFlow editOrder = new EditOrderWorkFlow(); editOrder.Execute(); break; case "4": RemoveItemWorkFlow removeOrder = new RemoveItemWorkFlow(); removeOrder.Execute(); break; case "5": return; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("Flooring Program "); Console.WriteLine("----------------------"); Console.WriteLine("1. Display Orders"); Console.WriteLine("2. Add An Order"); Console.WriteLine("3. Edit An Order"); Console.WriteLine("4. Remove an Order"); Console.WriteLine("5. Quit"); Console.WriteLine("\nEnter Selection:"); string userinput = Console.ReadLine(); switch (userinput) { case "1": DisplayOrderWorkFlow LookupWorkFlow = new DisplayOrderWorkFlow(); LookupWorkFlow.Execute(); break; case "2": AddOrderWorkflow AddAnOrder = new AddOrderWorkflow(); AddAnOrder.Execute(); break; case "3": EditOrderWorkFlow EditAnOrder = new EditOrderWorkFlow(); EditAnOrder.Execute(); break; case "4": RemoveOrderWorkflow RemoveAnOrder = new RemoveOrderWorkflow(); RemoveAnOrder.Execute(); break; case "5": return; default: Console.WriteLine("That's not a selection"); break; } } }
public static void Start() { OrderManager manager = OrderManagerFactory.Create(); while (true) { DisplayMenu(); string userInput = Console.ReadLine(); switch (userInput) { case "1": OrderLookupWorkFlow lookupWorkFlow = new OrderLookupWorkFlow(); lookupWorkFlow.Execute(manager); break; case "2": AllOrdersWorkFlow allOrdersWorkFlow = new AllOrdersWorkFlow(); allOrdersWorkFlow.Execute(manager); break; case "3": AddOrderWorkFlow addWorkFlow = new AddOrderWorkFlow(); addWorkFlow.Execute(manager); break; case "4": EditOrderWorkFlow editWorkFlow = new EditOrderWorkFlow(); editWorkFlow.Execute(manager); break; case "5": RemoveOrderWorkFlow removeWorkFlow = new RemoveOrderWorkFlow(); removeWorkFlow.Execute(manager); break; case "6": return; default: Console.WriteLine("Please enter a valid choice. Press any key to continue."); Console.ReadKey(); break; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("SWC Corp Flooring Orders"); Console.WriteLine("----------------------------------"); Console.WriteLine("1. Display Orders"); Console.WriteLine("2. Add an Order"); Console.WriteLine("3. Edit an Order"); Console.WriteLine("4. Remove an Order"); Console.WriteLine("5. Quit"); Console.WriteLine("\nEnter selection: "); string userInput = Console.ReadLine(); switch (userInput) { case "1": DisplayOrderWorkFlow displayOrderWorkFlow = new DisplayOrderWorkFlow(); displayOrderWorkFlow.Execute(); break; case "2": AddOrderWorkFlow addOrderWorkFlow = new AddOrderWorkFlow(); addOrderWorkFlow.Execute(); break; case "3": EditOrderWorkFlow editOrderWork = new EditOrderWorkFlow(); editOrderWork.Execute(); break; case "4": RemoveOrderWorkFlow removeOrderWorkFlow = new RemoveOrderWorkFlow(); removeOrderWorkFlow.Execute(); break; case "5": return; } } }
private static bool Choice() { string userinput = Console.ReadLine(); switch (userinput) { case "1": DisplayOrderWorkFlow displayOrder = new DisplayOrderWorkFlow(); displayOrder.Execute(); break; case "2": AddOrderWorkFlow addOrder = new AddOrderWorkFlow(); addOrder.Execute(); break; case "3": EditOrderWorkFlow editOrder = new EditOrderWorkFlow(); editOrder.Execute(); break; case "4": RemoveOrderWorkFlow removeOrder = new RemoveOrderWorkFlow(); removeOrder.Execute(); break; case "Q": return(false); default: Console.WriteLine("Try again!!!!"); Console.WriteLine("Press Enter to continue...."); Console.ReadKey(); break; } return(true); }
public static void Start() { try { const string divLine = "============================================================="; //Default Display Mode DisplayMode displayMode = DisplayMode.Condensed; while (true) { Console.Clear(); Console.WriteLine(divLine); Console.WriteLine("| SWC CORP. - FLOTSam (Flooring Order Tracking System) {0}", "|"); Console.WriteLine(divLine); Console.WriteLine("|0. Toggle display mode (currently: {0}) {1," + (23 - displayMode.ToString().Length) + "}", displayMode.ToString(), "|"); Console.WriteLine("|1. List ALL Files (given: nothing) {0}", "|"); Console.WriteLine("|2. List ALL Orders (given: order date) {0}", "|"); Console.WriteLine("|3. Add an Order (given: order date) {0}", "|"); Console.WriteLine("|4. Show an Order (given: order date & order number) {0}", "|"); Console.WriteLine("|5. Edit an Order (given: order date & order number) {0}", "|"); Console.WriteLine("|6. Remove an Order (given: order date & order number) {0}", "|"); Console.WriteLine("|7. (Q) to quit {0}", "|"); Console.WriteLine(divLine); Console.Write("\nEnter selection: "); string userInput = Console.ReadLine().ToUpper(); switch (userInput) { case "0": if (displayMode == DisplayMode.Normal) { displayMode = DisplayMode.Condensed; } else { displayMode = DisplayMode.Normal; } break; case "1": ListAllFilesWorkFlow.Execute(); break; case "2": DisplayOrdersWorkFlow.Execute(displayMode); break; case "3": AddOrderWorkFlow.Execute(displayMode); break; case "4": DisplayOrderWorkFlow.Execute(displayMode); break; case "5": EditOrderWorkFlow.Execute(displayMode); break; case "6": DeleteOrderWorkFlow.Execute(displayMode); break; case "7": case "Q": return; default: //Invalid Input ConsoleIO.DisplayText($"Invalid entry! Please enter a number between 1 & 7 \nPress any key to try again...", false, true, ConsoleColor.Red); continue; } } } catch (Exception ex) { ConsoleIO.DisplayError(ex); } }