Example #1
0
        //Dissplays application's trainer menu
        private static void TrainerMenu()
        {
            Console.Clear();
            WriteInColor(schoolName, ConsoleColor.Yellow);
            WriteInColor("\n\n1.", ConsoleColor.Green);
            WriteInColor(" Add Trainer\n", ConsoleColor.Cyan);
            WriteInColor("2.", ConsoleColor.Green);
            WriteInColor(" Show Trainers per Course\n", ConsoleColor.Cyan);
            WriteInColor("3.", ConsoleColor.Green);
            WriteInColor(" Display Data\n", ConsoleColor.Cyan);
            WriteInColor("4.", ConsoleColor.Green);
            WriteInColor(" Return\n", ConsoleColor.Red);
            Console.Write(Environment.NewLine);
            int selection = InputMinMax(1, 4);

            switch (selection)
            {
            case 1: AddTrainer();
                TrainerMenu();
                break;

            case 2:
                ShowData.ShowTrainerPerCourse(Courses);
                PressKeyToContinue();
                TrainerMenu();
                break;

            case 3: DisplaydataMenu();
                break;

            case 4: ShowMainMenu();
                break;

            default:
                InvalidSelection();
                TrainerMenu();
                break;
            }
        }
Example #2
0
        //Dissplays application's display data menu
        private static void DisplaydataMenu()
        {
            Console.Clear();
            WriteInColor(schoolName, ConsoleColor.Yellow);
            WriteInColor("\n\n1.", ConsoleColor.Green);
            WriteInColor(" Show Courses\n", ConsoleColor.Cyan);                           //show all information on course
            WriteInColor("2.", ConsoleColor.Green);
            WriteInColor(" Show Trainers\n", ConsoleColor.Cyan);                          //show all info on trainers
            WriteInColor("3.", ConsoleColor.Green);
            WriteInColor(" Show Students\n", ConsoleColor.Cyan);                          //show all info students
            WriteInColor("4.", ConsoleColor.Green);
            WriteInColor(" Show Assignements\n", ConsoleColor.Cyan);                      //show all assignement info
            WriteInColor("5.", ConsoleColor.Green);
            WriteInColor(" Show Trainers per Course\n", ConsoleColor.Cyan);               //show trainers per course
            WriteInColor("6.", ConsoleColor.Green);
            WriteInColor(" Show Students per Course\n", ConsoleColor.Cyan);               //show students per course
            WriteInColor("7.", ConsoleColor.Green);
            WriteInColor(" Show Assignement per Course\n", ConsoleColor.Cyan);            //show assignement per course
            WriteInColor("8.", ConsoleColor.Green);
            WriteInColor(" Show Assignements per Student\n", ConsoleColor.Cyan);          //show assignement per student
            WriteInColor("9.", ConsoleColor.Green);
            WriteInColor(" Show Student with more than one Course\n", ConsoleColor.Cyan); //show students with more than one course
            WriteInColor("10.", ConsoleColor.Green);
            WriteInColor(" Return\n", ConsoleColor.Red);
            Console.Write(Environment.NewLine);
            int selection = InputMinMax(1, 10);

            switch (selection)
            {
            case 1: ShowData.ShowCourses(Courses);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 2:
                ShowData.ShowTrainers(Trainers);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 3:
                ShowData.ShowStudents(Students);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 4:
                ShowData.ShowAssignements(Assignements);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 5:
                ShowData.ShowTrainerPerCourse(Courses);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 6:
                ShowData.ShowStudentsPerCourse(Courses);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 7:
                ShowData.ShowAssignementPerCourse(Courses);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 8:
                ShowData.ShowAssignementPerStudent(Students);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 9:
                ShowData.ShowStudentsWithManyCourses(Students);
                PressKeyToContinue();
                DisplaydataMenu();
                break;

            case 10: ShowMainMenu();
                break;

            default: InvalidSelection();
                DisplaydataMenu();
                break;
            }
        }