예제 #1
0
        public static List <StudPerCourse> CreateListsStudentsPerCourse() // CREATE LIST, STUDENTS per COURSE______________________________________
        {
            List <Student> Mathites = ListProvider.CreateListsStudents();
            List <Course>  Mathima  = ListProvider.CreateListCourses();

            StudPerCourse SPC001 = new StudPerCourse(Mathima, Mathites);

            List <StudPerCourse> studentspermathima = new List <StudPerCourse>();

            studentspermathima.Add(SPC001);

            return(studentspermathima);
        }
예제 #2
0
        public static void PrintListsStudentsPerCourse() // PRINT STUDENTS per COURSE______________________________________
        {
            List <StudPerCourse> SpC = new List <StudPerCourse>();

            SpC = StudPerCourse.CreateListsStudentsPerCourse();


            foreach (var item in SpC[0].Mathima)
            {
                item.Output();

                foreach (var ass in SpC[0].Students)
                {
                    if (ass.Subject == item.Type)
                    {
                        ass.Output();
                    }
                }
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            string one       = "1";
            string two       = "2";
            string three     = "3";
            string e         = "E";
            string userInput = null;
            string a         = "A";
            string c         = "C";
            string m         = "M";
            string t         = "T";
            string s         = "S";

            while (userInput != e)
            {
                // CHOOSE ONE OF THE 3 MAJOR PATHS
                Console.WriteLine("\nChoose Action: \n(1) INPUT MODE, \n(2) READ LISTS MODE, \n(3) DATE INPUT SEARCH, \n(E) EXIT ");
                userInput = Console.ReadLine();

                // PART A >>> USER INPUT DATA PART >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

                if (userInput == one)
                {
                    while (userInput != e)
                    {
                        Console.WriteLine("\nChoose Action: \n(C) COURSE INPUT, \n(S) STUDENT INPUT, \n(T) TRAINER INPUT, \n(A) ASSIGNMENT INPUT, \n(E) EXIT ");
                        userInput = Console.ReadLine();
                        //
                        if (userInput == c)
                        {
                            UserInputCourseData.UserInput();
                        }
                        else if (userInput == s)
                        {
                            UserInputStudentData.UserInput();
                        }
                        else if (userInput == t)
                        {
                            UserInputTrainerData.UserInput();
                        }
                        else if (userInput == a)
                        {
                            UserInputAssignmentData.UserInput();
                        }
                        else if (userInput == e) // Step Back Command____________________________________________________________________________
                        {
                            Console.ForegroundColor = ConsoleColor.Red;
                            Console.WriteLine("EXIT");
                            Console.ForegroundColor = ConsoleColor.White;
                        }
                        else // In the Case of false Data Input__________________________________________________________________________________
                        {
                            Console.ForegroundColor = ConsoleColor.DarkRed;
                            Console.WriteLine("Unindentified Input, Please Choose Again");
                            Console.ForegroundColor = ConsoleColor.White;
                        }
                    }
                }

                // PART B >>> READ PREMADE LISTS  PART >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


                else if (userInput == two)
                {
                    while (userInput != e)
                    {
                        Console.WriteLine("\nChoose Action: \n(1) Lists, \n(S) Student per Course, \n(T) Trainers per Course, \n(A) Assignments per Course, \n(C) Assignements per Student, \n(M) Students in more Courses, \n(E) EXIT");
                        userInput = Console.ReadLine();

                        if (userInput == one)
                        {
                            PART_A.Navigation(); // Simple Initial Lists Display_______________________________________________________________
                        }
                        else if (userInput == s)
                        {
                            StudPerCourse.PrintListsStudentsPerCourse();
                        }
                        else if (userInput == t)
                        {
                            TrainPerCourse.PrintListsTrainersPerCourse();
                        }
                        else if (userInput == a)
                        {
                            AssPerCourse.PrintListsAssPerCourse();
                        }
                        else if (userInput == c)
                        {
                            AssPerStudent.PrintListsAssPerStudents();
                        }
                        else if (userInput == m)
                        {
                            StudentsAtBothCourses.CourseCheck(); // Students that have more than one Courses___________________________________
                        }
                        else if (userInput == e)                 // Step Back Command__________________________________________________________________________
                        {
                            Console.ForegroundColor = ConsoleColor.Red;
                            Console.WriteLine("EXIT");
                            Console.ForegroundColor = ConsoleColor.White;
                        }
                        else // In the Case of false Data Input________________________________________________________________________________
                        {
                            Console.ForegroundColor = ConsoleColor.DarkRed;
                            Console.WriteLine("Unindentified Input, Please Choose Again");
                            Console.ForegroundColor = ConsoleColor.White;
                        }
                    }
                }

                // PART C >>> USER INPUT DATE AND CHECK PART >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


                else if (userInput == three)
                {
                    DateCheck.DateCheckAss();
                }
                else if (userInput == e) // Coplete Exit________________________________________________________________________
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("EXIT");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else  // In the Case of false Data Input________________________________________________________________________
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    Console.WriteLine("Unindentified Input, Please Choose Again");
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
        }