Пример #1
0
 public List <Tarefa> Consultar(DateTime inicio, DateTime fim, int id)
 {
     if (inicio < fim)
     {
         TarefasRepositorio rep = new TarefasRepositorio();
         return(rep.Find(inicio, fim, id));
     }
     else
     {
         throw new DataHoraInvalidaException();
     }
 }
Пример #2
0
 public void Cadastrar(Tarefa t)
 {
     if (t.DataHora >= DateTime.Now)
     {
         TarefasRepositorio rep = new TarefasRepositorio();
         rep.Insert(t);
     }
     else
     {
         throw new DataHoraInvalidaException();
     }
 }