Beispiel #1
0
        public static void Start()
        {
            while (true)//Loop back to menu
            {
                Console.Clear();
                Console.WriteLine("**********************************************************************");
                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("*");
                Console.WriteLine("**********************************************************************");

                string input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    DisplayWorkflow displayWorkflow = new DisplayWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddWorkflow addWorkflow = new AddWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditWorkflow editWorkflow = new EditWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveWorkflow removeWorkflow = new RemoveWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "5":
                    return;
                }
            }
        }
Beispiel #2
0
        public static void Start()
        {
            ConsoleIO.SplashScreen();
            Console.ReadKey();

            while (true)
            {
                ConsoleIO.Header("\t~Order Menu~");
                Console.WriteLine("1. Display all orders by a date.");
                Console.WriteLine("2. Display a specific order.");
                Console.WriteLine("3. Add an order.");
                Console.WriteLine("4. Edit an order.");
                Console.WriteLine("5. Remove an order.");
                Console.WriteLine("6. Quit");
                Console.WriteLine();
                Console.Write("Enter selection: ");

                string selectionNum = Console.ReadLine();
                switch (selectionNum)
                {
                case "1":
                    //Display orders by date
                    DisplayAllWorkflow allWorkflow = new DisplayAllWorkflow();
                    allWorkflow.Execute();
                    break;

                case "2":
                    //Display single order
                    DisplaySingleWorkflow singleWorkflow = new DisplaySingleWorkflow();
                    singleWorkflow.Execute();
                    break;

                case "3":
                    //Add
                    AddWorkflow addWorkflow = new AddWorkflow();
                    addWorkflow.Execute();
                    break;

                case "4":
                    //Edit
                    EditWorkflow editWorkflow = new EditWorkflow();
                    editWorkflow.Execute();
                    break;

                case "5":
                    //Remove
                    RemoveWorkflow removeWorkflow = new RemoveWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "6":
                    return;

                default:
                    Console.WriteLine();
                    ConsoleIO.EntryError();
                    ConsoleIO.TryAgain();
                    Console.ReadKey();
                    continue;
                }
            }
        }