Example #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                SelectProjetos    = new SelectList(await _projetoGrpcService.ListarAsync(), "Id", "Nome");
                SelectSistemas    = new SelectList(await _sistemaGrpcService.ListarAsync(), "Id", "Descricao");
                SelectWorkflows   = new SelectList(await _workflowGrpcService.ListarAsync(), "Id", "Nome");
                SelectTipoTarefas = new SelectList(await _tipoTarefaGrpcService.ListarAsync(), "Id", "Nome");

                return(Page());
            }

            await _tarefaGrpcService.IncluirAsync(Tarefa);

            return(RedirectToPage("Listar"));
        }