Beispiel #1
0
        public void InsertMenu()
        {
            bool ContinueOrExit = true;

            do
            {
                Console.WriteLine("If u want to insert a student to the private school data base write 1 in console");
                Console.WriteLine("If u want to insert a trainer to the private school data base write 2 in console");
                Console.WriteLine("If u want to insert a course to the private school data base write 3 in console");
                Console.WriteLine("If u want to insert a assignment to the private school data base write 4 in console");
                Console.WriteLine("If u want to relate student with course to the private school data base write 5 in console");
                Console.WriteLine("If u want to relate trainer with course to the private school data base write 6 in console");
                Console.WriteLine("If u want to relate assignment with course to the private school data base write 7 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.Create();
                    break;

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

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

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

                case "5":
                    Console.Clear();
                    watchService.Create();
                    break;

                case "6":
                    Console.Clear();
                    teachService.Create();
                    break;

                case "7":
                    Console.Clear();
                    assignService.Create();
                    break;

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

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