Example #1
0
        public static void Menu()
        {
            int optionOperation = MainMenus.ExecuteMenu(PrintMenu, 4);

            if (optionOperation == 4)
            {
                return;
            }

            int optionEntity = MainMenus.SelectEntity();

            if (optionEntity == 1 && optionOperation == 1)
            {
                VehicleUI.AddVehicle();
            }
            else if (optionEntity == 1 && optionOperation == 2)
            {
                VehicleUI.DeleteVehicle();
            }
            else if (optionEntity == 1 && optionOperation == 3)
            {
                Console.WriteLine("Change is not possible!");
            }
            else if (optionEntity == 2 && optionOperation == 3)
            {
                Console.WriteLine("Change is not possible!");
            }
        }
Example #2
0
        public static void Menu()
        {
            int optionOperation = MainMenus.ExecuteMenu(PrintMenu, 6);

            if (optionOperation == 6)
            {
                return;
            }

            int optionEntity = MainMenus.SelectEntity();

            if (optionOperation == 1 && optionEntity == 1)
            {
                VehicleUI.PrintAllVehicles();
            }
            else if (optionOperation == 2 && optionEntity == 1)
            {
                VehicleUI.PrintExistingVehicles();
            }
            else if (optionOperation == 3 && optionEntity == 1)
            {
                VehicleUI.PrintDeletedVehicles();
            }
            else if (optionOperation == 4 && optionEntity == 1)
            {
                VehicleUI.PrintSoldVehicles();
            }
            else if (optionOperation == 4 && optionEntity == 2)
            {
                Console.WriteLine("Options 4 and 5 are only possible for vehicles!");
            }
            else if (optionOperation == 5 && optionEntity == 1)
            {
                VehicleUI.PrintUnsoldVehicles();
            }
            else if (optionOperation == 5 && optionEntity == 2)
            {
                Console.WriteLine("Options 4 and 5 are only possible for vehicles!");
            }
        }