Example #1
0
        public static void TrainersPerCourseMatch()
        {
            Console.Clear();
            TrainersLogic.PrintAllTrainers();
            Console.WriteLine("\n\t\t\t\t----Choose Trainer----\n\n\t\tType Trainers Number to Assign and PRESS Enter\n");
            var choise = "k";

            choise = Console.ReadLine();
            if (!String.IsNullOrWhiteSpace(choise) && Convert.ToInt32(choise) <= allTrainersList.Count)
            {
                Trainer selectedTrainer = allTrainersList[Convert.ToInt32(choise) - 1];
                CourseSelection(selectedTrainer);
            }
        }
Example #2
0
        public static void PrintMenu()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("\tLists Menu \n1) All Courses \n2) All Assignments \n3) All Trainers \n4) All Students \n5) Trainers Per Course \n6) Assignments Per Course \n7) Students per Course" +
                                  "\n8) Assignments per Student \n9) Students with two courses or more \n10) Assignment Submissions \n\n");
                Console.Write("Select an option , or press Enter to return to Main Menu : ");
                switch (Console.ReadLine())
                {
                case "1":
                    if (CourseLogic.allCoursesList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No courses have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    else
                    {
                        Console.Clear();
                        CourseLogic.PrintAllCourses();
                        Console.Write("\n\nPress Enter to return to View menu.");
                        Console.ReadLine();
                        continue;
                    }

                case "2":
                    if (AssignmentsLogic.allAssignmentsList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No assignments have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    else
                    {
                        Console.Clear();
                        AssignmentsLogic.PrintAllAssignments();
                        Console.Write("\n\nPress Enter to return to View menu.");
                        Console.ReadLine();
                        continue;
                    }

                case "3":
                    if (TrainersLogic.allTrainersList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No trainers have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    else
                    {
                        Console.Clear();
                        TrainersLogic.PrintAllTrainers();
                        Console.Write("\n\nPress Enter to return to View menu.");
                        Console.ReadLine();
                        continue;
                    }

                case "4":
                    if (StudentsLogic.allStudentsList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No students have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    else
                    {
                        Console.Clear();
                        StudentsLogic.PrintAllStudents();
                        Console.Write("\n\nPress Enter to return to View menu.");
                        Console.ReadLine();
                        continue;
                    }

                case "5":
                    if (CourseLogic.allCoursesList.Count == 0 || TrainersLogic.allTrainersList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No trainers or courses have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    CourseLogic.PrintAllTrainersPerCourse();
                    continue;

                case "6":
                    if (AssignmentsLogic.allAssignmentsList.Count == 0 || CourseLogic.allCoursesList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No assignments or courses have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    else
                    {
                        CourseLogic.PrintAllAssignmentsPerCourse();
                        continue;
                    }

                case "7":
                    if (StudentsLogic.allStudentsList.Count == 0 || CourseLogic.allCoursesList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No students or courses have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    CourseLogic.PrintAllStudentsPerCourse();
                    continue;

                case "8":
                    if (StudentsLogic.allStudentsList.Count == 0 || AssignmentsLogic.allAssignmentsList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No students or assignments have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    StudentsLogic.PrintAllAssignmentsPerStudent();
                    continue;

                case "9":
                    if (StudentsLogic.studentsWithMoreThanOneCourseList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No student has more than one course.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    StudentsLogic.PrintAllStudentsWithMoreThanOneCourses();
                    continue;

                case "10":
                    if (StudentsLogic.allStudentsList.Count == 0 || AssignmentsLogic.allAssignmentsList.Count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("No students or assignments have been registered yet.\n\nPress Enter to return to View Menu");
                        Console.ReadLine();
                        continue;
                    }
                    StudentsLogic.AssignmentSubmissions();
                    continue;

                default:
                    break;
                }
                break;
            }
        }