Exemple #1
0
        public static void Faculty()
        {
            FacultyManager functionWithFaculty = new FacultyManager();
            CourseManager  functionWithCourse  = new CourseManager();
            StudentManager functionWithStudent = new StudentManager();
            int            choice;

            do
            {
                Console.Clear();
                Console.WriteLine("Press \n1.View list of faculties.\n2.View list of courses.\n3.View list of students.\n\n4.Logout");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    FacultyManagement faculty = new FacultyManagement();
                    faculty.DisplayTheListOfFaculties(functionWithFaculty);
                    break;

                case 2:
                    CourseManagement course = new CourseManagement();
                    course.DisplayTheListOfCourses(functionWithCourse);
                    break;

                case 3:
                    StudentManagement student = new StudentManagement();
                    student.DisplayTheListOfStudents(functionWithStudent);
                    break;

                case 4:
                    Console.Clear();
                    Console.WriteLine("Logged out successfully.\nPress any key to login again.");
                    Console.ReadKey();
                    GetLoginDetails();
                    break;

                default:
                    break;
                }
            }while (choice < 5);
        }
Exemple #2
0
        public static void Manager()
        {
            int choice;

            do
            {
                Console.Clear();
                Console.WriteLine("Press\n1.Courses details.\n2.Faculty details.\n3.Student details.\n\n4.Logout");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    CourseManagement courseManagement = new CourseManagement();
                    courseManagement.GetChoice();
                    break;

                case 2:
                    FacultyManagement facultyManagement = new FacultyManagement();
                    facultyManagement.GetChoice();
                    break;

                case 3:
                    StudentManagement studentManagement = new StudentManagement();
                    studentManagement.GetChoice();
                    break;

                case 4:
                    Console.Clear();
                    Console.WriteLine("Logged out successfully.\nPress any key to login again.");
                    Console.ReadKey();
                    GetLoginDetails();
                    break;

                default:
                    break;
                }
            }while (choice < 5);
        }
        static void Main(string[] args)
        {
            StudentManagement studentManagement = new StudentManagement();

            studentManagement.GetChoice();
        }