Пример #1
0
 /// <summary>
 /// Adds the exam.
 /// </summary>
 /// <param name="examDetails">The exam details.</param>
 public void AddExam(Exam examDetails)
 {
     Context.Exams.Add(examDetails);
 }
Пример #2
0
 /// <summary>
 /// Adds the exam.
 /// </summary>
 /// <param name="examDetails">The exam details.</param>
 public void AddExam(Exam examDetails)
 {
     this.repository.AddExam(examDetails);
 }
Пример #3
0
 /// <summary>
 /// Updates the exam.
 /// </summary>
 /// <param name="examDetails">The exam details.</param>
 public void UpdateExam(Exam examDetails)
 {
     var exam = Context.Exams.FirstOrDefault(@this => @this.ExamID == examDetails.ExamID);
     if (exam != null)
     {
         exam.CandidateID = examDetails.CandidateID;
         exam.PaperSetID = examDetails.PaperSetID;
     }
     else
     {
         Context.Exams.Add(examDetails);
     }
 }
Пример #4
0
 /// <summary>
 /// Updates the exam.
 /// </summary>
 /// <param name="examDetails">The exam details.</param>
 public void UpdateExam(Exam examDetails)
 {
     this.repository.UpdateExam(examDetails);
 }