public JsonResult Apagar(int id) { var apagou = repository.Apagar(id); var resultado = new { status = apagou }; return(Json(resultado, JsonRequestBehavior.AllowGet)); }
public ActionResult Apagar(int id) { if (LoginController.retorno == true) { repository.Apagar(id); return(RedirectToAction("Index")); } else { return(Redirect("/login")); } }
public JsonResult Apagar(int id) { bool apagou = repository.Apagar(id); return(Json(new { status = apagou }, JsonRequestBehavior.AllowGet)); }
public ActionResult Apagar(int id) { repository.Apagar(id); return(RedirectToAction("Index")); }
public ActionResult Apagar(int id) { repository.Apagar(id); return(View()); }