示例#1
0
        public void Atualizar(Produto_ValorExcecao produto_ValorExcecao)
        {
            AtualizarProduto_ValorExcecaoCommand command = new AtualizarProduto_ValorExcecaoCommand(produto_ValorExcecao.Id, produto_ValorExcecao.Id_produto, produto_ValorExcecao.Id_produtoTipo, produto_ValorExcecao.Valor,
                                                                                                    produto_ValorExcecao.Id_periodo, produto_ValorExcecao.Promocao, produto_ValorExcecao.Porcentagem);

            _bus.SendCommand(command);
        }
        public void Handle(AtualizarProduto_ValorExcecaoCommand message)
        {
            if (!CommandValido(message))
            {
                return;
            }
            Produto_ValorExcecao produto_ValorExcecao = Produto_ValorExcecaoFactory.Produto_ValorExcecaoFull(message.Id, message.Id_produto, message.Id_produtoTipo, message.Valor, message.Id_periodo, message.Promocao, message.Porcentagem);

            _produto_ValorExcecaoRepository.Atualizar(produto_ValorExcecao);
            if (!Commit())
            {
                return;
            }
        }