コード例 #1
0
 public virtual ActionResult AjaxDelete(int id)
 {
     try
     {
         Service.Delete(id);
         return(Json(SuccessMessageCreator.GetMessage(), JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(ErrorMessageCreator.GetMessage(e), JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
 public virtual ActionResult AjaxUpdate(TCommandDto dto)
 {
     try
     {
         Service.Update(dto);
         return(Json(SuccessMessageCreator.GetMessage(), JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(ErrorMessageCreator.GetMessage(e), JsonRequestBehavior.AllowGet));
     }
 }