public static menuIDs addFirstCourseMenu() { //menuID = "000"; Console.WriteLine("Every School must have at least one course.\n"); Console.WriteLine("What would you like to do?\n" + "1. Create synthetic Data\n" + "2. Add a course manually"); Console.WriteLine("EXIT to exit program\n"); int selection = Helper.menuSelectionChecker(2, true); menuIDs IDselect; switch (selection) { case 1: Synthetic synthetic = new Synthetic(); synthetic.createSyntheticData(); IDselect = menuIDs.centralMenu; break; case 2: ProjectHelper.addNew(availableTypes.Course); IDselect = menuIDs.centralMenu; break; default: IDselect = menuIDs.exit; break; } return(IDselect); }
public static menuIDs centralMenu() { Console.WriteLine("Welcome to our school!!"); //menuID = "100"; Console.WriteLine("\nPlease choose what you want to do:\n" + "1. Courses\n" + "2. Students\n" + "3. Trainers\n" + "4. Assignments"); if (!Synthetic.created) { Console.WriteLine("5. Create Synthetic Data"); } Console.WriteLine("EXIT to exit program\n"); int selection; if (!Synthetic.created) { selection = Helper.menuSelectionChecker(5, true); } else { selection = Helper.menuSelectionChecker(4, true); } menuIDs IDselect = menuIDs.centralMenu; switch (selection) { case 1: IDselect = menuIDs.courseMenu; break; case 2: IDselect = menuIDs.studentMenu; break; case 3: IDselect = menuIDs.trainertMenu; break; case 4: IDselect = menuIDs.assignmentMenu; break; case 5: Synthetic synthetic = new Synthetic(); synthetic.createSyntheticData(); IDselect = menuIDs.centralMenu; break; default: IDselect = menuIDs.exit; break; } if (Helper.checkListEmpty(DataBase.getAllCourses()) && selection != -1) { IDselect = menuIDs.addFirstCourseMenu; } return(IDselect); }