public void AddNewConnectionExamEmptyAnswer(Guid examId, Guid answersId, Guid studExamRes)
 {
     try
     {
         ExamOpenAnswerByStd openAnswerByStd = new ExamOpenAnswerByStd();
         openAnswerByStd.ExamId = examId;
         openAnswerByStd.StudentExamResultId        = studExamRes;
         openAnswerByStd.IsChecked                  = true;
         openAnswerByStd.OpenAnswerGivenByStutentId = answersId;
         Database.ExamOpenAnswerByStds.Create(openAnswerByStd);
         Database.ExamOpenAnswerByStds.Save();
     }
     catch (Exception ex)
     {
         Logger.Log.Error(ex.Message);
     }
 }
Beispiel #2
0
 public void UpdateStudResult(int mark, Guid idStudResult, Guid idConnectionExamAnsw)
 {
     try
     {
         StudentExamResult studentResult = GetStudentResultById(idStudResult);
         studentResult.Mark = mark;
         Database.StudentExamResults.Update(studentResult);
         Database.StudentExamResults.Save();
         ExamOpenAnswerByStd examOpenAnswerByStd = Database.ExamOpenAnswerByStds.GetById(idConnectionExamAnsw);
         examOpenAnswerByStd.IsChecked = true;
         Database.ExamOpenAnswerByStds.Update(examOpenAnswerByStd);
         Database.ExamOpenAnswerByStds.Save();
     }
     catch (Exception ex)
     {
         Logger.Log.Error(ex.Message);
     }
 }