コード例 #1
0
        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));
        }
コード例 #2
0
        //[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"));
            }
        }