public ActionResult EditLesson(int lessonID) { LessonFullInf lesson = LessonsDB.GetLessonFullInf(lessonID); List <Class> classes = ClassesDB.GetClasses(); ViewBag.Classes = classes; List <TeacherShortInf> teachers = TeachersDB.GetTeachersShortInf(); ViewBag.Teachers = teachers; List <Subject> subjects = SubjectsDB.GetSubjects(); ViewBag.Subjects = subjects; return(View(lesson)); }
public ActionResult AddMarkForm(int lessonID) { LessonFullInf lesson = LessonsDB.GetLessonFullInf(lessonID); int classID = lesson.Class_ID; List <Pupil> pupils = PupilsDB.GetPupilsInClass(classID); ViewBag.Pupils = pupils; List <TypeOfWork> types = TypesOfWorkDB.GetTypesOfWork(); ViewBag.Types = types; ViewData["LessonID"] = lessonID; return(View()); }
public ActionResult SelectAbsentPupils(int lessonID) { LessonFullInf lesson = LessonsDB.GetLessonFullInf(lessonID); List <Pupil> pupils = PupilsDB.GetPupilsInClass(lesson.Class_ID); TeacherController.classID = lesson.Class_ID; ViewBag.Pupils = pupils; ViewData["Lesson"] = lesson.Lesson_ID; // список ID учеников, которые были ранее отмечены как отсутствующие на данном уроке List <int> previosAbsent = LessonsDB.GetAbsentPupils(lessonID); ViewBag.AbsentPupils = previosAbsent; // удаляем всех отсутствующих отмеченных ранее MarksDB.DeleteAbsentPupilsMark(lessonID); return(View()); }