Example #1
0
 public Boolean Excluir(AgendamentoDTO pAgendamentoDTO)
 {
     try
     {
         return(AgendamentoDAO.Excluir(pAgendamentoDTO));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #2
0
        public ActionResult Excluir(int IdAgendamento)
        {
            Agendamento agd = _dao.Buscar(IdAgendamento);

            try
            {
                _dao.Excluir(IdAgendamento);
                LogINFO(this.ToString(), "Excluir agendamento: " + LAB5Utils.ReflectionUtils.GetObjectDescription(agd));
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                Alert(ex.Message);
                LogWARN(this.ToString(), "Erro ao excluir agendamento: " + LAB5Utils.ReflectionUtils.GetObjectDescription(agd) + ex.Message);
                ViewBag.Erro = ex.Message;
            }
            return(View("Index"));
        }