コード例 #1
0
        public async Task <IActionResult> UpdateRateByCountryStateZip(CountryStateZipModel model)
        {
            if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageTaxSettings))
            {
                return(Content("Access denied"));
            }

            var taxRate = await _taxRateService.GetTaxRateByIdAsync(model.Id);

            taxRate.Zip        = model.Zip == "*" ? null : model.Zip;
            taxRate.Percentage = model.Percentage;
            await _taxRateService.UpdateTaxRateAsync(taxRate);

            return(new NullJsonResult());
        }