Esempio n. 1
0
        static void UserMenuCase(PrivateSchool CodingBootcamp)
        {
            int user_case;

            do
            {
                try
                {
                    PrintUserMenu();
                    user_case = Convert.ToInt32(Console.ReadLine());
                    Console.WriteLine("\n\n\n\n\n\n\n");
                    switch (user_case)
                    {
                    case 1:
                        //Add Student
                        add_student(CodingBootcamp);
                        break;

                    case 2:
                        //Print Students
                        CodingBootcamp.OutputStudents();
                        break;

                    case 3:
                        //Add Trainer
                        add_teacher(CodingBootcamp);
                        break;

                    case 4:
                        //Print Trainers
                        CodingBootcamp.OutputTrainer();
                        break;

                    case 5:
                        //Add Course
                        add_course(CodingBootcamp);
                        break;

                    case 6:
                        //Print Courses
                        CodingBootcamp.OutputCourses();
                        break;

                    case 7:
                        //Add Assignment
                        add_assignment(CodingBootcamp);
                        break;

                    case 8:
                        //Print Assignments
                        CodingBootcamp.OutputAssignments();
                        break;

                    case 9:
                        //Assign Cource to Trainers
                        set_course_trainer(CodingBootcamp);
                        break;

                    case 10:
                        //Assign Cource to Students
                        set_course_student(CodingBootcamp);
                        break;

                    case 11:
                        //Assign Assignments to Students
                        set_assignment_student(CodingBootcamp);
                        break;

                    case 12:
                        //Print Cources Assigned to Trainers
                        CodingBootcamp.OutputCoursesTrainers();
                        break;

                    case 13:
                        //Print Cources Assigned to Students
                        CodingBootcamp.OutputCoursesStudents();
                        break;

                    case 14:
                        //Print Assignments Assigned to Students
                        CodingBootcamp.OutputAssignmentsStudents();
                        break;

                    case 15:
                        //Print Students that have More than 1 assignment
                        CodingBootcamp.OutputStudentsTwoAssignments();
                        break;

                    case 16:
                        //Print Assignments that have to be submited on day
                        set_assignment_week(CodingBootcamp);
                        break;

                    default:
                        Console.WriteLine("Please select a correct option!Please try again");
                        continue;
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    Console.WriteLine("\nUse Input Fields Correctly Please!\n\n\n");
                    continue;
                }
            } while (true);
        }