public IActionResult Cadastrar(Projeto p, int dprNomeStatus) { ViewBag.NomeStatus = new SelectList(_statusDAO.ListarStatusPorNome(), "TipoStatusId", "NomeStatus"); if (ModelState.IsValid) { p.StatusProjeto = _statusDAO.ListarStatusPorId(dprNomeStatus); _projetoDAO.CadastrarNovoProjeto(p); return(View(p)); } return(View(p)); }
public IActionResult Cadastrar(Tarefa t, int dprResponsavel, int dprNomeStatus, int hdnJobId) { t.JobId = hdnJobId; ViewBag.Responsavel = new SelectList(_funcionarioDAO.ListarFuncionarios(), "FuncionarioId", "NomeFuncionario"); ViewBag.NomeStatus = new SelectList(_statusDAO.ListarStatusPorNome(), "TipoStatusId", "NomeStatus"); if (ModelState.IsValid) { t.Responsavel = _funcionarioDAO.ListarFuncionariosPorId(dprResponsavel); t.StatusTarefa = _statusDAO.ListarStatusPorId(dprNomeStatus); _tarefaDAO.CadastrarNovaTarefa(t); return(View(t)); } return(View(t)); }
public IActionResult Cadastrar(Job j, int dprDptoResponsavel, int dprNomeStatus, int hdnProjetoId) { j.ProjetoId = hdnProjetoId; ViewBag.DptoResponsavel = new SelectList(_departamentoDAO.ListarDepartamentos(), "DepartamentoId", "NomeDepartamento"); ViewBag.NomeStatus = new SelectList(_statusDAO.ListarStatusPorNome(), "TipoStatusId", "NomeStatus"); if (ModelState.IsValid) { j.DptoResponsavel = _departamentoDAO.ListarDepartamentosPorId(dprDptoResponsavel); j.StatusJob = _statusDAO.ListarStatusPorId(dprNomeStatus); _jobDAO.CadastrarNovoJob(j); return(View(j)); } return(View(j)); }