Пример #1
0
 public ActionResult Create(AssessmentViewModel model)
 {
     try
     {
         db                = new dbTIREntities();
         siteUser          = ((SiteUser)Session["SiteUser"]);
         assessmentService = new AssessmentService(siteUser, db);
         string result = assessmentService.CreateAssessment(model);
         ViewBag.UserMessage = result;
         AssessmentViewModel assessmentViewModel = new AssessmentViewModel();
         FillDropDowns(assessmentViewModel);
         if (result.ToLower().Contains("success"))
         {
             ModelState.Clear();
         }
         return(View(assessmentViewModel));
     }
     catch (Exception ex)
     {
         Logging log = new Logging();
         log.LogException(ex);
         return(View("GeneralError"));
     }
 }