public JsonResult Apagar(int id)
        {
            var apagou    = repository.Apagar(id);
            var resultado = new { status = apagou };

            return(Json(resultado, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 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"));
 }
示例#5
0
        public ActionResult Apagar(int id)
        {
            repository.Apagar(id);

            return(View());
        }