Пример #1
0
 public ActionResult SubmitDrawNames(DrawNamesDisplayModel model)
 {
     if (!ModelState.IsValid)
     {
         return(PartialView("_DrawNames", model));
     }
     try
     {
         var m = _secretSantaBl.DrawNames(model);
         m.Saved = true;
         return(PartialView("_DrawNames", m));
     }
     catch (AppException ax)
     {
         ModelState.AddModelError("", ax.AppMessage);
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message);
         _log.LogWarning(ex.Message);
     }
     return(PartialView("_DrawNames", model));
 }