public GenericCommandResult AtualizarOrdem([FromBody] AtualizarOrdemSistemaCommand command, [FromServices] SistemaHandler handler, [FromServices] ISistemaRepository sistema_repository) { return((GenericCommandResult)handler.Handle(new AtualizarOrdemSistemaCommand(command.SistemasOrdem, sistema_repository))); }
public GenericCommandResult Listar([FromServices] SistemaHandler handler) { return((GenericCommandResult)handler.Handle(new ListarSistemaCommand { IdFirebase = HttpContext.User.Identities.FirstOrDefault().Claims.FirstOrDefault(c => c.Type.Contains("user_id")).Value })); }
public GenericCommandResult ListarItens([FromQuery] Guid idSistema, [FromServices] SistemaHandler handler) { return((GenericCommandResult)handler.Handle(new ListarItensSistemaCommand { IdSistema = idSistema })); }
public GenericCommandResult AtivarDesativar([FromBody] AtivarDesativarSistemaCommand command, [FromServices] SistemaHandler handler, [FromServices] ISistemaRepository sistema_repository) { return((GenericCommandResult)handler.Handle(new AtivarDesativarSistemaCommand(command.IdSistema, command.Ativo, sistema_repository))); }
public GenericCommandResult Iniciar([FromBody] CriarSistemaCommand command, [FromServices] SistemaHandler handler, [FromServices] IEstabelecimentoRepository estabelecimentoRepository) { return((GenericCommandResult)handler.Handle(new CriarSistemaCommand( HttpContext.User.Identities.FirstOrDefault().Claims.FirstOrDefault(c => c.Type.Contains("user_id")).Value, command.Nome, command.Descricao, command.ItensSistema, estabelecimentoRepository ))); }
public GenericCommandResult AlterarItemSistema([FromBody] AlterarItemSistemaCommand command, [FromServices] SistemaHandler handler, [FromServices] IUnidadeMedidaRepository unidade_medida_repository, [FromServices] ISistemaItemRepository sistema_item_repository) { return((GenericCommandResult)handler.Handle(new AlterarItemSistemaCommand(command.IdItemSistema, command.Nome, command.Descricao, command.IdUnidadeMedida, unidade_medida_repository, sistema_item_repository))); }
public GenericCommandResult Alterar([FromBody] AtualizarSistemaCommand command, [FromServices] SistemaHandler handler, [FromServices] ISistemaRepository sistema_repository) { return((GenericCommandResult)handler.Handle(new AtualizarSistemaCommand( HttpContext.User.Identities.FirstOrDefault().Claims.FirstOrDefault(c => c.Type.Contains("user_id")).Value, command.Id, command.Nome, command.Descricao, command.Ativo, command.ItensSistema ))); }