Exemple #1
0
 public ActionResult AddExam(ExamDTO examDTO, Guid subjectId)
 {
     if (ModelState.IsValid)
     {
         examDTO.Id = Guid.NewGuid();
         examService.AddNewTExam(examDTO);
         examService.AddNewCOnnectionSubjectExam(examDTO.Id, subjectId);
         Logger.Log.Info("User " + User.Identity.GetUserId() + "add new exam " + examDTO.Id + " to subject " + subjectId);
         return(RedirectToAction("ViewExam", new { id = subjectId }));
     }
     return(RedirectToAction("ViewExam", new { id = subjectId }));
 }