예제 #1
0
 public ActionResult EditMemberStateHistory(FormCollection form, MemberStateHistoryCreateEditViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             var memberStateHist = new MemberStateHistory();
             Mapper.DynamicMap(model, memberStateHist);
             memberProvider.UpdateMemberStateHistory(memberStateHist);
             return(Json(new AjaxViewModel(true, model, null)));
         }
         catch (Exception ex)
         {
             return(Json(new AjaxViewModel(false, null, ex.Message)));
         }
     }
     return(View(model));
 }
예제 #2
0
 public void UpdateMemberStateHistory(MemberStateHistory memberStateHist)
 {
     context.Entry(memberStateHist).State = System.Data.Entity.EntityState.Modified;
     SetAuditFields(memberStateHist);
     context.SaveChanges();
 }