public IActionResult Edit(HorasColaborador horas)
 {
     if (ModelState.IsValid)
     {
         HorasColabRepo.Update(horas);
         return(RedirectToAction("Index"));
     }
     return(View(horas));
 }
        public IActionResult Delete(HorasColaborador horas)
        {
            HorasColaborador horasColab = HorasColabRepo.GetHorasColaborador(horas.Id_HorasColaborador);

            if (horasColab != null)
            {
                HorasColabRepo.Delete(horas.Id_HorasColaborador);
                TempData["Message"] = "Lançamento de hora removido da tarefa";
            }
            return(RedirectToAction("Index"));
        }
        public IActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            HorasColaborador horas = HorasColabRepo.GetHorasColaborador(id.Value);

            if (horas == null)
            {
                return(NotFound());
            }
            return(View(horas));
        }
        public IActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            HorasColaborador horasColab = HorasColabRepo.GetHorasColaborador(id.Value);

            if (horasColab == null)
            {
                return(NotFound());
            }
            ViewBag.Colaboradores = ColabRepo.ListarColaboradores();
            ViewBag.Tarefas       = TarefaRepo.ListarTarefas();
            return(View(horasColab));
        }
 public IActionResult Create(HorasColaborador horas)
 {
     HorasColabRepo.Add(horas);
     return(RedirectToAction("Index"));
 }
 public IActionResult Index()
 {
     return(View(HorasColabRepo.ListarHorasColaboradores()));
 }