public ActionResult EditarEstado(Estados model) { if (Request.IsAjaxRequest()) { _estado.Editar(model); return Json(new { data = model }); } return HttpNotFound(); }
public ActionResult AgregarEstado(Estados model) { if (ModelState.IsValid) { if (Request.IsAjaxRequest()) { _estado.Agregar(model); } return Json(new { data = model }); } return View(model); }