public List <Course> getAllCourseOfLecturer(Lecturer l) { return(SettingDatabase.GetAllLearnedCoursesOfLecturer(l)); }
public bool setapprovedCourseForLecturer(Lecturer l, Course c, bool approved = true) { return(SettingDatabase.ApprovedCourseForLecturer(l, c, approved)); }
public bool getApprovedStateOfCourseForLecturer(Lecturer l, Course c) { return(SettingDatabase.GetStateApprovalOfSLectureInCourse(l, c)); }
private void updateButtons() { if (selected_lesson != null) { if (checkBox_LessonsOfStudentSelected.Checked != true) { btn_Add.Enabled = true; btn_RemoveLesson.Enabled = false; } else { btn_Add.Enabled = false; btn_RemoveLesson.Enabled = true; } checkBox_Lesson.Checked = true; txt_lbl_day.Text = selected_lesson.Day; txt_lbl_End.Text = GeneralFuntion.formatTime(selected_lesson.End); txt_lbl_Start.Text = GeneralFuntion.formatTime(selected_lesson.Start); txt_lbl_Type.Text = selected_lesson.Type; txt_TB_infoLesson.Text = selected_lesson.InfoLesson; string nameTeacher = ""; int amountStudent = 0; int maxStudInClass = 0; ClassRoom classroom = dal.class_rooms.Where(x => x.building.Equals(selected_lesson.building) && x.number == selected_lesson.number).FirstOrDefault(); if (classroom != null) { maxStudInClass = classroom.maxStudents; } if (selected_lesson.Type.Equals("Lecture")) { Lecturer l = dal.lecturers.Find(selected_lesson.LTeacherID); if (l != null) { nameTeacher = "L" + l.ID.ToString() + " : " + l.Name; } if (secretary != null) { Lecture lecture = secretary.geLectureFromLesson(selected_lesson); if (lecture != null) { amountStudent = lecture.NumStudent; } } else if (admin != null) { Lecture lecture = admin.geLectureFromLesson(selected_lesson); if (lecture != null) { amountStudent = lecture.NumStudent; } } else if (student != null) { Lecture lecture = SettingDatabase.geLectureFromLesson(selected_lesson); if (lecture != null) { amountStudent = lecture.NumStudent; } } } else { Practitioner p = dal.practitiners.Find(selected_lesson.LTeacherID); if (p != null) { nameTeacher = "P" + p.ID.ToString() + " : " + p.Name; } if (secretary != null) { if (selected_lesson.Type.Equals("Practise")) { Practise Practise = secretary.getPractiseFormLesson(selected_lesson); if (Practise != null) { amountStudent = Practise.NumStudent; } } else if (selected_lesson.Type.Equals("Lab")) { Lab lab = secretary.geLabFromLesson(selected_lesson); if (lab != null) { amountStudent = lab.NumStudent; } } else if (student != null) { Lab lab = SettingDatabase.geLabFromLesson(selected_lesson); if (lab != null) { amountStudent = lab.NumStudent; } } } else if (admin != null) { if (selected_lesson.Type.Equals("Practise")) { Practise Practise = admin.getPractiseFormLesson(selected_lesson); if (Practise != null) { amountStudent = Practise.NumStudent; } } else if (selected_lesson.Type.Equals("Lab")) { Lab lab = admin.geLabFromLesson(selected_lesson); if (lab != null) { amountStudent = lab.NumStudent; } } } } txt_lbl_teacher.Text = nameTeacher; if (maxStudInClass == 0) { maxStudInClass = amountStudent; } txt_lbl_NumCurrentStudents.Text = amountStudent.ToString() + " / " + maxStudInClass.ToString(); } else { btn_RemoveLesson.Enabled = false; btn_Add.Enabled = false; txt_lbl_day.Text = ""; txt_lbl_End.Text = ""; txt_lbl_Start.Text = ""; txt_lbl_Type.Text = ""; txt_lbl_teacher.Text = ""; txt_lbl_NumCurrentStudents.Text = ""; } }