示例#1
0
        public async Task <TaxRuleVw> AddTaxRuleAsync(Guid municipalityId, TaxRuleDto rule)
        {
            var taxRule = _mapper.Map <TaxRule>(rule);
            await _taxRuleDomainService.AddTaxRuleAsync(municipalityId, taxRule);

            return(_mapper.Map <TaxRuleVw>(taxRule));
        }
示例#2
0
        public async Task <TaxRuleVw> EditTaxRuleAsync(Guid taxRuleId, TaxRuleDto rule)
        {
            var taxRule = _mapper.Map <TaxRule>(rule);
            var error   = await _taxRuleDomainService.EditTaxRuleAsync(taxRuleId, taxRule);

            if (!string.IsNullOrWhiteSpace(error))
            {
                var fault = new FaultHandle(error);
                throw new FaultException <FaultHandle>(fault);
            }

            return(_mapper.Map <TaxRuleVw>(taxRule));
        }
示例#3
0
 public Task <TaxRuleVw> EditTaxRuleAsync(Guid taxRuleId, TaxRuleDto rule)
 {
     return(Channel.EditTaxRuleAsync(taxRuleId, rule));
 }
示例#4
0
 public Task <TaxRuleVw> AddTaxRuleAsync(Guid municipalityId, TaxRuleDto rule)
 {
     return(Channel.AddTaxRuleAsync(municipalityId, rule));
 }