public ActionResult DeleteConfirmed(int id)
        {
            var response = _tipoSetorAppService.Excluir(id);

            if (response.Equals(""))
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                TempData["Mensagem"] = response;
                return(RedirectToAction("Index"));
            }
        }
Exemple #2
0
        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"));
            }
        }