Exemple #1
0
        // ----------TrainerInsertion----------
        public static void TrainerInsertion()
        {
            Console.Write("\n\n\n  Enter trainer's first name:  ");
            string FirstName = Console.ReadLine();

            Console.Write("  Enter trainer's last name:  ");
            string LastName = Console.ReadLine();

            Console.Write("  Enter trainer's Subject:  ");
            string Subject = Console.ReadLine();

            InsertMethods.InsertsTrainer(FirstName, LastName, Subject);
        }
Exemple #2
0
        // ----------TrainerPerCourseInsertion----------
        public static void TrainerPerCourseInsertion()
        {
            Console.WriteLine("\n\n\n\n\n");
            Queries.TotalofTrainers();
            Console.WriteLine("\n\nCheck from the table above the TID's from all trainers");
            Console.WriteLine("Enter the TID of your choice");
            int TID = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("\n\n\n\n\n");
            Queries.TotalofCourses();
            Console.WriteLine("\n\nCheck from the table above the CID's from all courses");
            Console.WriteLine("Enter the CID of your choice");
            int CID = Convert.ToInt32(Console.ReadLine());

            InsertMethods.InsertTrainerCourse(TID, CID);
        }
Exemple #3
0
        // ----------StudentInsertion----------
        public static void StudentInsertion()
        {
            Console.Write("  Enter First Name:  ");
            string FirstName = Console.ReadLine();

            Console.Write("  Enter Lastname:  ");
            string LastName = Console.ReadLine();

            Console.Write("  In a form like this (year, month, day), e.g. 2006-04-22 \n" +
                          "  Enter your Date of Birth:  ");
            DateTime DateofBirth = Convert.ToDateTime(Console.ReadLine());

            Console.Write("  Enter Tuition Fees:  ");
            int TuitionFees = Convert.ToInt32(Console.ReadLine());

            InsertMethods.Insertstudent(FirstName, LastName, DateofBirth, TuitionFees);
        }
Exemple #4
0
        // ----------AssignmentInsertion----------
        public static void AssignmentInsertion()
        {
            Console.Write("\n\n\n  Enter Assigment Title:  ");
            string Title = Console.ReadLine();

            Console.Write("  Enter Assigment description:  ");
            string Description = Console.ReadLine();

            Console.Write("  In a form like this (year, month, day), e.g. 2006-04-22 \n" +
                          "  Enter Assignment Date:  ");
            DateTime SubDate = Convert.ToDateTime(Console.ReadLine());

            Console.Write("  Enter an Oral Mark Points from 0 to 100:  ");
            int OralMark = Convert.ToInt32(Console.ReadLine());

            Console.Write("  Enter the Total Mark Points:  ");
            int TotalMark = Convert.ToInt32(Console.ReadLine());

            InsertMethods.InsertAssignment(Title, Description, SubDate, OralMark, TotalMark);
        }
Exemple #5
0
        // ----------CourseInsertion----------
        public static void CourseInsertion()
        {
            Console.Write("\n\n\n  Enter Course Title (etc C# Sharp,Java or JavaScript):  ");
            string Title = Console.ReadLine();

            Console.Write("  Enter Course Stream:  ");
            string Stream = Console.ReadLine();

            Console.Write("  Enter Course type (etc Full Time or Part Time):  ");
            string Type = Console.ReadLine();

            Console.Write("  In a form like this (year, month, day), e.g. 2006-04-22 \n" +
                          "  Enter Start Date of the Course:  ");
            DateTime StartDate = Convert.ToDateTime(Console.ReadLine());

            Console.Write("  Enter End Date of the Course:  ");
            DateTime EndDate = Convert.ToDateTime(Console.ReadLine());


            InsertMethods.InsertCourse(Title, Stream, Type, StartDate, EndDate);
        }
Exemple #6
0
        // ----------StudentPerCourseInsertion----------
        public static void AssignmentPerStudentPerCourseInsertion()
        {
            Console.WriteLine("\n\n\n\n\n");
            Queries.TotalofAssignments();
            Console.WriteLine("\n\nCheck from the table above the AID's from all assignments");
            Console.WriteLine("Enter the AID of your choice");
            int AID = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("\n\n\n\n\n");
            Queries.TotalofStudents();
            Console.WriteLine("\n\nCheck from the table above the SID's from all students");
            Console.WriteLine("Enter the SID of your choice");
            int SID = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("\n\n\n\n\n");
            Queries.TotalofCourses();
            Console.WriteLine("\n\nCheck from the table above the CID's from all courses");
            Console.WriteLine("Enter the CID of your choice");
            int CID = Convert.ToInt32(Console.ReadLine());

            InsertMethods.InsertstudentCourse(AID, SID, CID);
        }
        public static void RunMenu()
        {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("\n\n\t\t\t\t\t\t\t\t   WELCOME TO OUR AMAZING PRIVATE SCHOOL ");
            Console.WriteLine("  \t\t\t\t\t\t\t\t  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

            Console.WriteLine(" \t\t\t\t\t\t\t\t  <<<      S.U.P.E.R.H.E.R.O.E.S      >>>\n\n\n\n\n");
            Console.ForegroundColor = ConsoleColor.White;

            string answer = "";

            do
            {
                Console.WriteLine("\t\t\t\t\t\t\tPlease choose a number to decide what will be your next step:");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("\t\t\t\t\t\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("\t\t\t\t\t\t\tPress 0 to exit\n");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Write("\t\t\t\t\t\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Write("\t\t\t\t\t\t\tPress 1 to insert a student\n");
                Console.Write("\t\t\t\t\t\t\tPress 2 to insert a trainer\n");
                Console.Write("\t\t\t\t\t\t\tPress 3 to insert an assignment\n");
                Console.Write("\t\t\t\t\t\t\tPress 4 to insert a course\n");
                Console.Write("\t\t\t\t\t\t\tPress 5 to insert a student in a course\n");
                Console.Write("\t\t\t\t\t\t\tPress 6 to insert a trainer in a course\n");
                Console.Write("\t\t\t\t\t\t\tPress 7 to insert an assignment in a student and in a course\n");
                Console.Write("\t\t\t\t\t\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("\t\t\t\t\t\t\tPress 8 to see all the tables\n");
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("\t\t\t\t\t\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
                answer = Console.ReadLine();


                if (answer == "0")
                {
                    Environment.Exit(0);
                }

                else if (answer == "1")
                {
                    InsertMethods.StudentInsertion();
                    Queries.TotalofStudents();
                }
                else if (answer == "2")
                {
                    InsertMethods.TrainerInsertion();
                    Queries.TotalofTrainers();
                }
                else if (answer == "3")
                {
                    InsertMethods.AssignmentInsertion();
                    Queries.TotalofAssignments();
                }
                else if (answer == "4")
                {
                    InsertMethods.CourseInsertion();
                    Queries.TotalofCourses();
                }
                else if (answer == "5")
                {
                    InsertMethods.StudentPerCourseInsertion();
                    Queries.TotalStudentsPerCourse();
                }
                else if (answer == "6")
                {
                    InsertMethods.TrainerPerCourseInsertion();
                    Queries.TotalTrainersPerCourse();
                }
                else if (answer == "7")
                {
                    InsertMethods.AssignmentPerStudentPerCourseInsertion();
                    Queries.TotalAssignmentsPerStudentPerCourse();
                }
                else if (answer == "8")
                {
                    Queries.TotalofStudents();
                    Queries.TotalofTrainers();
                    Queries.TotalofAssignments();
                    Queries.TotalofCourses();
                    Queries.TotalStudentsPerCourse();
                    Queries.TotalTrainersPerCourse();
                    Queries.TotalAssignmentsPerCourse();
                    Queries.TotalAssignmentsPerStudentPerCourse();
                    Queries.TotalofStudentsWithMultipleCourses();
                }
            } while (answer != "" || answer != null);
        }