Exemplo n.º 1
0
        public IActionResult PutByWorkflow(Guid idTarefa, [FromBody] Guid idWorkflow)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                _tarefaAppService.AlterarPorWorkflow(idTarefa, idWorkflow);
            }
            catch (Exception)
            {
                if (!ObjExists(idTarefa))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 2
0
        public IActionResult OnPost(Guid idTarefa, Guid idWorkflow)
        {
            _tarefaAppService.AlterarPorWorkflow(idTarefa, idWorkflow);

            _hubContext.Clients.All.SendAsync("send", "-> Lorem Ipsum");

            return(Page());
        }
Exemplo n.º 3
0
        public override async Task <BaseReply> AlterarPorWorkflow(AlterarPorWorkflowRequest request, ServerCallContext context)
        {
            Guid idTarefa   = new Guid(request.IdTarefa);
            Guid idWorkflow = new Guid(request.IdWorkflow);

            return(await Task.FromResult(new BaseReply
            {
                Sucesso = _tarefaAppService.AlterarPorWorkflow(idTarefa, idWorkflow)
            }));
        }
Exemplo n.º 4
0
        public IActionResult OnPost(Guid idTarefa, Guid idWorkflow)
        {
            _tarefaAppService.AlterarPorWorkflow(idTarefa, idWorkflow);

            return(Page());
        }