Exemplo n.º 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));
     }
 }
Exemplo n.º 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));
     }
 }