public ResultadoCalculo CalcularDesconto() { if (Minuta == 0) { throw new Exception("Minuta não informada"); } if (Servico == 0) { throw new Exception("Serviço não informado"); } if (ValorDesconto == 0) { throw new Exception("Valor desconto não informado ou igual a zero"); } if (SolicitacaoId == 0) { throw new Exception("ID da Solicitação Comercial não informada ou igual a zero"); } using (var ws = new WsCalculo.Calcular()) { var resultado = ws.Calcula_Impostos_Minuta_Desconto( this.Minuta, this.Servico, (double)this.ValorDesconto, this.SolicitacaoId); return(new ResultadoCalculo(resultado)); } }
public ResultadoCalculo CalcularDescontoRedex() { if (Booking == 0) { throw new Exception("Booking não informado"); } if (Servico == 0) { throw new Exception("Serviço não informado"); } if (ValorDesconto == 0) { throw new Exception("Valor desconto não informado ou igual a zero"); } if (TabelaId == 0) { throw new Exception("Tabela não informada ou igual a zero"); } if (SolicitacaoId == 0) { throw new Exception("ID da Solicitação Comercial não informada ou igual a zero"); } using (var ws = new WsCalculo.Calcular()) { var resultado = ws.Calcula_Impostos_Desconto_Redex( this.Booking, this.Servico, (double)this.ValorDesconto, this.SeqGr, this.ClienteId, this.TabelaId, this.SolicitacaoId); return(new ResultadoCalculo(resultado)); } }