public ActionResult DeleteConfirmed(int id) { var response = _tipoSetorAppService.Excluir(id); if (response.Equals("")) { return(RedirectToAction("Index")); } else { TempData["Mensagem"] = response; return(RedirectToAction("Index")); } }
public ActionResult DeleteConfirmed(int id) { if (Session["usuario"] == null) { return(RedirectToAction("Login", "Usuarios")); } var response = _tipoSetorAppService.Excluir(id); if (response.Equals("")) { return(RedirectToAction("Index")); } else { TempData["Mensagem"] = response; return(RedirectToAction("Index")); } }