Esempio n. 1
0
        public ProjetoViewModel()
        {
            List <Projeto> projetos = new BoProjeto().ConsultarPorUsuario(Ambiente.UsuarioLogado.Codigo, true);

            projetos.Insert(0, new Projeto {
                Codigo = 0, ProjetoPai = 0, Titulo = "Nenhum"
            });
            Projetos = new SelectList(projetos, "Codigo", "Titulo");
        }
Esempio n. 2
0
        public ActionResult CadastrarProjeto(ProjetoViewModel model)
        {
            BoProjeto boProjeto = new BoProjeto();

            boProjeto.Incluir(model.Titulo, Ambiente.UsuarioLogado.Codigo, model.ProjetoPai);

            ViewBag.Message = "Projeto cadastrado com sucesso";

            return(Index());
        }