Ejemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            try
            {
                _clienteApp.Deletar(id);
                TempData["sucesso"] = "Cliente excluído com sucesso";

                return(RedirectToAction("Index"));
            }
            catch
            {
                TempData["erro"] = "Erro ao excluir cliente";
                return(RedirectToAction("Index"));
            }
        }
Ejemplo n.º 2
0
        public ActionResult ExcluirConfirma(int id)
        {
            _clienteAppServico.Deletar(id);

            return(RedirectToAction("Index"));
        }