public ExamsList GenerateExamList() { var exam = new ExamsList(); var exams = Exams.Generate(); exam.Exams = new List <Exams>(); exam.Exams.Add(exams); return(exam); }
public override async Task PreRender() { if (IsExistingExams && AnyExistingExams && !StudentOralExam.ExamId.HasValue) { StudentOralExam.ExamId = ExamsList?.FirstOrDefault()?.Id; } await CheckExamDate(); await base.PreRender(); }
public ExamsListRow AddExam(ref PreferencesRow p) { ExamsListRow ls = ExamsList.NewExamsListRow(); ExamsList.AddExamsListRow(ls); Guid g = Guid.NewGuid(); ls.PID = p.PID; ////MAKES THE DOC FILE ls.GUID = g.ToString().Replace("-", null);//.Split('-')[4]; ls.Time = DateTime.Now; ls.Class = p.Class; return(ls); }
public override async Task Load() { CoursesList = await _courseService.GetList(); SemestersList = await _semesterService.GetList(); if (!Context.IsPostBack) { var course = CoursesList.FirstOrDefault(); if (course != null) { SelectedCourseId = course.Id; } var semester = SemestersList.FirstOrDefault(); if (semester != null) { SelectedSemesterId = semester.Id; } } CourseInstanceExist = await _courseService.CourseInstanceExists(SelectedCourseId, SelectedSemesterId); if (CourseInstanceExist) { ExamsList = await _examService.GetOralExamsListForCourseInstance(SelectedCourseId, SelectedSemesterId); EnrolmentsList = await _enrolmentService.GetForCourseInstance(SelectedCourseId, SelectedSemesterId); if (AddNewStudent) { StudentsList = await _studentService.GetAll(); } } AnyExistingExams = ExamsList != null && ExamsList.Any(); if (!Context.IsPostBack) { if (!AnyExistingExams) { IsExistingExams = false; } } await base.Load(); }