Пример #1
0
        /// <summary>
        /// Inserts a tax rate
        /// </summary>
        /// <param name="taxRate">Tax rate</param>
        public virtual void InsertTaxRate(WB_TaxRate taxRate)
        {
            if (taxRate == null)
            {
                throw new ArgumentNullException("taxRate");
            }

            _taxRateRepository.Insert(taxRate);

            //event notification
            _eventPublisher.EntityInserted(taxRate);
        }
Пример #2
0
        public ActionResult AddRateByCountryStateZip(ConfigurationModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings))
            {
                return(Content("Access denied"));
            }

            var taxRate = new WB_TaxRate
            {
                StoreId         = model.AddStoreId,
                TaxCategoryId   = model.AddTaxCategoryId,
                CountryId       = model.AddCountryId,
                StateProvinceId = model.AddStateProvinceId,
                Zip             = model.AddZip,
                Percentage      = model.AddPercentage,
            };

            _taxRateService.InsertTaxRate(taxRate);

            return(Json(new { Result = true }));
        }