コード例 #1
0
        public static void InsertData()
        {
            ShowInsertData();
            string input = CheckCorrectValueInsertMenu();

            if (input == "1")
            {
                //Insert Students
                Console.WriteLine();
                Student.InsertStudents();
                Student.Output();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "2")
            {
                //Insert Trainers
                Console.WriteLine();
                Trainer.InsertTrainers();
                Trainer.Output();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "3")
            {
                //Insert Assignments
                Console.WriteLine();
                Assignment.InsertAssignment();
                Assignment.Output();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "4")
            {
                //Insert Courses
                Console.WriteLine();
                Course.InsertCourses();
                Course.Output();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "5")
            {
                //Insert Students Per Course
                Console.WriteLine();
                Course.Output();
                StudentPerCourse.OutputInsert();
                StudentPerCourse.InsertStudentPerCourses();
                Console.WriteLine();
                StudentPerCourse.OutputInsert();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "6")
            {
                //Insert Trainers Per Course
                Console.WriteLine();
                Course.Output();
                TrainerPerCourse.OutputInsert();
                TrainerPerCourse.InsertTrainerPerCourses();
                TrainerPerCourse.OutputInsert();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "7")
            {
                //Insert Assignments Per Student Per Course
                Console.WriteLine();
                Exit.CheckToExitFolderInput();
            }
            else if (input == "8")
            {
                //Exit
                Exit.CheckToExitFolderInput();
            }
        }
コード例 #2
0
        public static void ExportData()
        {
            ShowExportData();
            string input = CheckCorrectValueExporttMenu();

            if (input == "1")
            {
                //Students List
                Student.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "2")
            {
                //Trainers List
                Trainer.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "3")
            {
                //Assignmgents List
                Assignment.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "4")
            {
                //Courses List
                Course.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "5")
            {
                //Students Per Course
                StudentPerCourse.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "6")
            {
                //Trainers Per Course
                TrainerPerCourse.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "7")
            {
                //Assignments Per Course
                AssignmentPerCourse.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "8")
            {
                //Assignments Per Course Per Student
                AssignmentPerCoursePerStudent.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "9")
            {
                //Students than belong to more than one Courses
                StudentCourses.Output();
                Exit.CheckToExitFolderSyntetic();
            }
            else if (input == "10")
            {
                //Exit
                Exit.CheckToExitFolderSyntetic();
            }
        }