static void printMenu() { Console.WriteLine("Print Menu\n==========="); Console.WriteLine("1. {0}\n2. {1}\n3. {2}\n4. {3}\n5. {4}\n0. {5}", "Student", "Teacher", "UProgram", "Course", "Degree", "Main Menu"); string p = Console.ReadLine(); switch (p) { case "1": Student.PrintStudentDetails(); printMenu(); break; case "2": Teacher.PrintTeacherDetails(); printMenu(); break; case "3": UProgram.PrintUProgramDetails(); printMenu(); break; case "4": Course.PrintCourseDetails(); printMenu(); break; case "5": Degree.PrintDegreeDetails(); printMenu(); break; case "0": mainMenu(); break; default: printMenu(); break; } }
static void dataMenu() { Console.WriteLine("Data Menu\n==========="); Console.WriteLine("1. {0}\n2. {1}\n3. {2}\n4. {3}\n5. {4}\n0. {5}", "Student", "Teacher", "UProgram", "Course", "Degree", "Main Menu"); string p = Console.ReadLine(); switch (p) { case "1": Student.GetStudentInformation(); dataMenu(); break; case "2": Teacher.GetTeacherInformation(); dataMenu(); break; case "3": UProgram.GetUProgramInformation(); dataMenu(); break; case "4": Course.GetCourseInformation(); dataMenu(); break; case "5": Degree.GetDegreeInformation(); dataMenu(); break; case "0": mainMenu(); break; default: dataMenu(); break; } }