Пример #1
0
 private static void isIndexValid(int index, int size)
 {
     if (index < 0 && index >= size)
     {
         Console.WriteLine("Invalid Selection");
         ChooseConsumableForDelete.chooseType();
     }
 }
Пример #2
0
        public static void MainMenu()
        {
            Console.WriteLine("\nMain Manue");
            Console.WriteLine("1) Add a consumable");
            Console.WriteLine("2) Edit a consumable");
            Console.WriteLine("3) Delete a consumable");
            Console.WriteLine("4) See the list of consumables and individually");
            Console.WriteLine("5) See overall info");
            Console.WriteLine("6) Exit");
            Console.Write("\r\nSelect an option: ");

            switch (Console.ReadLine())
            {
            case "1":
                Console.WriteLine("\nADD CONSUMABLE:");
                ChooseConsumableToAdd.chooseType();
                break;

            case "2":
                Console.WriteLine("\nEDITING CONSUMABLE:");
                ChooseConsumableForEdit.chooseType();
                break;

            case "3":
                Console.WriteLine("\nDELETING CONSUMABLE:");
                ChooseConsumableForDelete.chooseType();
                break;

            case "4":
                Console.WriteLine("\nSEE THE LIST OF CONSUMABLE AND INDIVIDUALLY PROCESSING:");
                DisplayConsumablesInformation.chooseType();
                break;

            case "5":
                Console.WriteLine("\nSEE OVERALL INFO PROCESSING:");
                OverAllInformation.Display();
                Program.MainMenu();
                break;

            default:
                break;
            }
        }