public async Task <IActionResult> AbrirProjeto(DadosSimplesProjetoViewModel modelo) { bool responsavel = _projetoRepo.VerificarResposavel(await ObterIdAsync(), modelo.IdProjeto); if (responsavel) { try { Projeto projeto = await _projetoRepo.BuscarProjetoPorId(modelo.IdProjeto); projeto.DataFinal = null; var resultado = await _projetoRepo.AlterarProjeto(projeto); if (resultado) { TempData["msg"] = 40; return(RedirectToAction("AcessarProjeto", "Projetos", new { Id = modelo.IdProjeto })); } } catch (Exception) { //gravar o Log } TempData["msg"] = 41; return(RedirectToAction("AcessarProjeto", "Projetos", new { Id = modelo.IdProjeto })); } return(StatusCode(203)); }
public async Task <IActionResult> AbrirProjeto(int IdProjeto) { bool responsavel = _projetoRepo.VerificarResposavel(await ObterIdAsync(), IdProjeto); if (responsavel) { DadosSimplesProjetoViewModel modelo = _projetoRepo.ObterDetalheProjetoSimplificado(IdProjeto); return(PartialView(modelo)); } return(StatusCode(203)); }