//Switch options to read the users choice of sub program private static void ReadStaffMenu() { string menuInput = MiscellaneousUtilities.ReadUserInput("Enter option: "); if (int.TryParse(menuInput, out int menuNumber)) { switch (menuNumber) { case 1: ListStaff(); break; case 2: RoomAvailability(); break; case 3: CreateSlot(); break; case 4: RemoveSlot(); break; case 5: Console.WriteLine("Exiting staff menu."); MainMenu.MainMenuLoop(); break; default: Console.WriteLine("Invalid input: {0}", menuNumber); break; } } else { Console.WriteLine("invalid input value: {0}", menuInput); } }
//Switch options to read the users choice of sub program private static void ReadMainMenu() { string menuInput = MiscellaneousUtilities.ReadUserInput("Enter option: "); if (int.TryParse(menuInput, out int menuNumber)) { switch (menuNumber) { case 1: ShowListRooms(); break; case 2: ShowListSlots(); break; case 3: StaffMenu.StaffMenuLoop(); break; case 4: StudentMenu.StudentMenuLoop(); break; case 5: Console.WriteLine("Terminating ASR."); Environment.Exit(0); break; default: Console.WriteLine("Invalid input: {0}", menuNumber); break; } } else { Console.WriteLine("invalid input value: {0}", menuInput); } }