Exemplo n.º 1
0
 public Tempo AddTempoTarefa(int atividadeId, int tarefaId, TempoViewModel tempo)
 {
     int horas = TimeSpan.Parse(tempo.Horas).Hours;
     var novoTempo = new Tempo()
     {
         Data = DateTime.Now,
         Tarefa_Id = tarefaId,
         Horas = horas,
         Autor_Id = tempo.Autor_Id
     };
     return _tarefaDal.AddTempoTarefa(novoTempo);
 }
Exemplo n.º 2
0
 public IHttpActionResult PostTempoTarefa(int atividadeId,int tarefaId, TempoViewModel tempo)
 {
     Tempo novoTempo = _tarefaBll.AddTempoTarefa(atividadeId,tarefaId, tempo);
     if (novoTempo == null)
         return NotFound();
     return Ok(novoTempo);
 }