//[HttpGet] public ActionResult ListarTarefas() { var lista = ColaboradorProjetoDao.ListarTarefas(); ViewBag.ListarProjetos = ColaboradorProjetoDao.ListarProjetosInfo(); //return RedirectToAction("Index", "Projetos"); return(View(lista)); }
public ActionResult IncluirControle() { var lista = ColaboradorProjetoDao.ListarNomes(); ViewBag.ListaDeColaboradores = new SelectList(lista, "Codigo", "Nome"); //ViewBag.ListaDeColaboradores = new SelectList(ColaboradorProjetoDao.ListarTarefas(), "Id", "Id"); //ViewBag.ListaDeColaboradores = new SelectList(ColaboradoresDao.ListarColaboradores(), "Id", "Nome"); //(ColaboradoresDao.ListarColaboradores(), "Id", "Nome"); return(View()); }
public ActionResult ExcluirTarefas(ColaboradorProjeto colaboradorProjeto) { try { ColaboradorProjetoDao.ExcluirTarefas(colaboradorProjeto); return(RedirectToAction("ListarTarefas")); } catch (Exception ex) { ViewBag.MensagemErro = ex.Message; return(View("_Erro")); } }
public ActionResult CadastrarHora(int id) { //ViewBag.Listar = HorasDao.ListarHora(); ViewBag.Listar = ControlePontoDao.ListarPontos(); //var colab = ColabProjetoDao.BuscarProjetoColab(id); var colab = ColaboradorProjetoDao.BuscarTarefas(id); //var hora = new HoraProjeto() { IdColab = colab.IdColabProjeto }; var hora = new HoraTrabalhada() { IdColab = colab.Id }; return(View(hora)); }
public ActionResult AlterarTarefas(ColaboradorProjeto colaboradorProjeto) { try { if (!ModelState.IsValid) { return(View()); } ColaboradorProjetoDao.AlterarTarefas(colaboradorProjeto); return(RedirectToAction("ListarTarefas")); } catch (Exception ex) { ViewBag.MensagemErro = ex.Message; return(View("_Erro")); } }
public ActionResult IncluirTarefa(ColaboradorProjeto colaboradorProjeto) { try { if (!ModelState.IsValid) { return(View()); } ColaboradorProjetoDao.IncluirTarefa(colaboradorProjeto); return(RedirectToAction("Index", "Projetos")); } catch (Exception ex) { ViewBag.MensagemErro = ex.Message; return(View("_Erro")); } }
//[HttpPost] //public ActionResult ListarTarefas(ColaboradorProjeto colaboradorProjeto) //{ // return RedirectToAction("Index", "Projetos"); //} public ActionResult VerificarTarefas(int id, string view) { try { //var Colaborador = ColaboradoresDao.BuscarColaborador(id); var ColaboradorProjeto = ColaboradorProjetoDao.BuscarTarefas(id); if (ColaboradorProjeto == null) { throw new Exception("Colaborador não existe, ou documento não informado"); } return(View(view, ColaboradorProjeto)); //return View(view, Projetos); //return RedirectToAction("Index", "Projetos"); } catch (Exception ex) { ViewBag.MensagemErro = ex.Message; return(View("_Erro")); } }
public ActionResult ListarProjetoColaborador(int id) { var lista = ColaboradorProjetoDao.ListarColaboradorProjeto(id); return(View(lista)); }