Пример #1
0
 public ActionResult EditMemberNotes(FormCollection form, MemberNoteViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             var memberNote = new MemberNote();
             Mapper.DynamicMap(model, memberNote);
             memberProvider.UpdateMemberNote(memberNote);
             return(Json(new AjaxViewModel(true, model, null)));
         }
         catch (Exception ex)
         {
             return(Json(new AjaxViewModel(false, null, ex.Message)));
         }
     }
     return(View(model));
 }