Ejemplo n.º 1
0
 public ActionResult CreateMemberStateHistory(FormCollection form, ListMemberStateHistoryViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             var memberStateHist = new MemberStateHistory();
             Mapper.DynamicMap(model, memberStateHist);
             memberProvider.AddMemberStateHistory(memberStateHist);
             return(Json(new AjaxViewModel(true, model, null)));
         }
         catch (Exception ex)
         {
             return(Json(new AjaxViewModel(false, null, ex.Message)));
         }
     }
     return(View());
 }