Example #1
0
 public void Excluir(Materia materia)
 {
     try
     {
         materiaDAO.Excluir(materia);
     }
     catch (ExcecaoSAG ex)
     {
         throw new ExcecaoSAG(ex.getMsg());
     }
 }
Example #2
0
 public void Delete(Materia materia)
 {
     try
     {
         if (!_questaoDAO.GetByID(materia.ID))
         {
             throw new Exception("A matéria está vinculada a uma Questão");
         }
         else
         {
             _materiaDAO.Excluir(materia);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }