/// <summary>
        /// Show Customer Main Menu
        /// </summary>
        public static void ShowCustomersMenu()
        {
            string menuOption = new string("");
            string menu       = "Customers\n\n" +
                                "1 - New\n" +
                                "2 - Show All\n" +
                                "3 - Find\n" +
                                "4 - Update\n" +
                                "\nb - Back\n\n" +
                                "Option: ";

            do
            {
                Console.Write(menu);
                menuOption = Console.ReadLine();

                switch (menuOption)
                {
                case "1":
                    ClearHelper.Clear();
                    CustomerForm.ShowForm();
                    break;

                case "2":
                    ClearHelper.Clear();
                    ShowAllWithAddress.Show();
                    Console.WriteLine();
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "3":
                    ClearHelper.Clear();
                    SearchForm.Search();
                    ClearHelper.Clear();
                    break;

                case "4":
                    ClearHelper.Clear();
                    ShowAll.Show();
                    Console.WriteLine();
                    Update.Show();
                    break;

                case "b":
                    ClearHelper.Clear();
                    break;

                default:
                    Console.WriteLine("Wrong option!");
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;
                }
            } while (menuOption != "b");
        }
Пример #2
0
        /// <summary>
        /// Displays MainMenu
        /// </summary>
        public static void ShowMainMenu()
        {
            string menuOption = new string("");
            string menu       = "Pizza Manager\n\n" +
                                "1 - Costumers\n" +
                                "2 - Addresses\n" +
                                "3 - Orders\n" +
                                "4 - Ingredients\n" +
                                "5 - Pizzas\n" +
                                "\ne - Exit\n\n" +
                                "Option: ";

            do
            {
                Console.Write(menu);
                menuOption = Console.ReadLine();

                switch (menuOption)
                {
                case "1":
                    ClearHelper.Clear();
                    CustomerMenu.ShowCustomersMenu();
                    break;

                case "2":
                    ClearHelper.Clear();
                    AddressMenu.ShowAddressMenu();
                    break;

                case "3":
                    ClearHelper.Clear();
                    OrderMenu.ShowOrderMenu();
                    break;

                case "4":
                    ClearHelper.Clear();
                    IngredientMenu.ShowIngredientsMenu();
                    break;

                case "5":
                    ClearHelper.Clear();
                    PizzaMenu.ShowPizzaMenu();
                    break;

                case "e":
                    Console.WriteLine("Bye!");
                    break;

                default:
                    Console.WriteLine("Wrong option!");
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;
                }
            } while (menuOption != "e");
        }
Пример #3
0
        /// <summary>
        /// Show Order Main Menu
        /// </summary>
        public static void ShowOrderMenu()
        {
            string menuOption = new string("");
            string menu       = "Orders\n\n" +
                                "1 - New\n" +
                                "2 - Show All\n" +
                                "3 - Show All by Costumer\n" +
                                "4 - Show All by Location\n" +
                                "5 - Find\n" +
                                "\nb - Back\n\n" +
                                "Option: ";

            do
            {
                Console.Write(menu);
                menuOption = Console.ReadLine();

                switch (menuOption)
                {
                case "1":
                    ClearHelper.Clear();
                    OrderForm.ShowForm();
                    break;

                case "2":
                    ClearHelper.Clear();
                    ShowAll.Show();
                    Console.WriteLine();
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "3":
                    ClearHelper.Clear();
                    ShowAllCustomer.Show();
                    Console.WriteLine();
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "4":
                    ClearHelper.Clear();
                    ShowAllAddress.Show();
                    Console.WriteLine();
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "5":
                    ClearHelper.Clear();
                    Console.WriteLine("Find Order!");
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "b":
                    ClearHelper.Clear();
                    break;

                default:
                    Console.WriteLine("Wrong option!");
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;
                }
            } while (menuOption != "b");
        }
        /// <summary>
        /// Show Ingredients Main Menu
        /// </summary>
        public static void ShowIngredientsMenu()
        {
            string menuOption = new string("");
            string menu       = "Ingredients\n\n" +
                                "1 - New\n" +
                                "2 - Invetory\n" +
                                "3 - Find\n" +
                                "4 - Update\n" +
                                //"5 - Delete\n" +
                                "\nb - Back\n\n" +
                                "Option: ";

            do
            {
                Console.Write(menu);
                menuOption = Console.ReadLine();

                switch (menuOption)
                {
                case "1":
                    ClearHelper.Clear();
                    IngredientForm.ShowForm();
                    break;

                case "2":
                    ClearHelper.Clear();
                    ShowAll.Show();
                    Console.WriteLine();
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;

                case "3":
                    ClearHelper.Clear();
                    SearchForm.Search();
                    break;

                case "4":
                    ClearHelper.Clear();
                    ShowAll.Show();
                    Console.WriteLine();
                    Update.Show();
                    break;

                /*case "5":
                 *  ClearHelper.Clear();
                 *  ShowAll.Show();
                 *  Console.WriteLine();
                 *  Delete.Show();
                 *  break;*/
                case "b":
                    ClearHelper.Clear();
                    break;

                default:
                    Console.WriteLine("Wrong option!");
                    Console.ReadKey();
                    ClearHelper.Clear();
                    break;
                }
            } while (menuOption != "b");
        }