Beispiel #1
0
 public ActionResult Apagar(int id)
 {
     if (LoginController.retorno == true)
     {
         repository.Apagar(id);
         return(RedirectToAction("Index"));
     }
     else
     {
         return(Redirect("/login"));
     }
 }
Beispiel #2
0
 public ActionResult Apagar(int id)
 {
     repository.Apagar(id);
     return(RedirectToAction("Index"));
 }
Beispiel #3
0
        public JsonResult Apagar(int id)
        {
            bool apagou = repository.Apagar(id);

            return(Json(new { status = apagou }, JsonRequestBehavior.AllowGet));
        }