Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var response = _tipoSetorAppService.Excluir(id);

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