Example #1
0
        public static void Menu()
        {
            bool exit = false;

            while (!exit)
            {
                Console.WriteLine("Hello, Please Select Option");
                Console.WriteLine("1. Category");
                Console.WriteLine("2. Product");
                Console.WriteLine("3. Exit App!");

                char ch = Convert.ToChar(Console.ReadLine());

                switch (ch)
                {
                case '1':
                    CategoryMenu.CategoryOperationMenu();
                    break;

                case '2':
                    ProductMenu.ProductOperationMenu();
                    break;

                case '3':
                    Console.WriteLine("Exit");
                    exit = true;
                    break;

                default:
                    Console.WriteLine("Invalid Selection");
                    break;
                }
                Console.Clear();
            }
        }
        public static void Menu()
        {
            bool exit = false;

            while (!exit)
            {
                Console.WriteLine("***Welcome to ProductCatalog, Please Select Option***");
                Console.WriteLine("a. Category");
                Console.WriteLine("b. Product");
                Console.WriteLine("c. Exit App!");

                char ch = Convert.ToChar(Console.ReadLine());

                switch (ch)
                {
                case 'a':
                    CategoryMenu.CategoryOperationMenu();
                    break;

                case 'b':
                    ProductMenu.ProductOperationMenu();

                    break;

                case 'c':
                    Console.WriteLine("Exit");
                    exit = true;
                    break;

                default:
                    Console.WriteLine("Invalid Selection!!");
                    break;
                }
                Console.Clear();
            }
        }