Exemplo n.º 1
0
 public ActionResult Delete(Manobrista manobrista)
 {
     try
     {
         Mensagem retorno = new Mensagem();
         retorno.msg = ManobristaBLL.Excluir(manobrista);
         return(RedirectToAction("Index", retorno));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Excluir(long id)
        {
            try
            {
                manobristaBLL.Excluir(id);

                _toastNotification.AddSuccessToastMessage();
                return RedirectToAction("Index", "Manobrista");
            }
            catch (Exception ex)
            {
                logger.LogError(ex, ex.Message);
                _toastNotification.AddErrorToastMessage();
                return RedirectToAction("Index", "Manobrista");
            }
        }