示例#1
0
        public void DisplayMenu()
        {
            bool ContinueOrExit = true;

            do
            {
                Console.WriteLine("If u want to see the students of the private school write 1 in console");
                Console.WriteLine("If u want to see the trainers of the private school write 2 in console");
                Console.WriteLine("If u want to see the courses of the private school write 3 in console");
                Console.WriteLine("If u want to see the assignments of the private school write 4 in console");
                Console.WriteLine("If u want to see the students for each course of the private school write 5 in console");
                Console.WriteLine("If u want to see the trainers for each course of the private school write 6 in console");
                Console.WriteLine("If u want to see the assignments for each course of the private school write 7 in console");
                Console.WriteLine("If u want to see the courses for each student of the private school write 8 in console");
                Console.WriteLine("If u want to see the assignments for each course for each student of the private school write 9 in console");
                Console.WriteLine("\nIf u want to return to Main Menu write 0 from keyboard\n");
                string userInput = Console.ReadLine();
                ContinueOrExit = CheckToContinueOrExit(userInput);
                switch (userInput)
                {
                case "1":
                    Console.Clear();
                    studentService.Display();
                    break;

                case "2":
                    Console.Clear();
                    trainerService.Display();
                    break;

                case "3":
                    Console.Clear();
                    courseService.Display();
                    break;

                case "4":
                    Console.Clear();
                    assignmentService.Display();
                    break;

                case "5":
                    Console.Clear();
                    courseService.DisplayStudentsPerCourse();
                    break;

                case "6":
                    Console.Clear();
                    courseService.DisplayTrainersPerCourse();
                    break;

                case "7":
                    Console.Clear();
                    courseService.DisplayAssignmentsPerCourse();
                    break;

                case "8":
                    Console.Clear();
                    studentService.DisplayMultyCoursesPerStudent();
                    break;

                case "9":
                    Console.Clear();
                    studentService.DisplayAssignmentsPerCoursePerStudent();
                    break;

                case "0":
                    Console.Clear();
                    break;

                default:
                    Console.Clear();
                    DisplayMenu();
                    break;
                }
            } while (ContinueOrExit);
        }