コード例 #1
0
        /// <summary>
        /// Deletes a tax rate
        /// </summary>
        /// <param name="taxRate">Tax rate</param>
        public virtual void DeleteTaxRate(TaxRate taxRate)
        {
            if (taxRate == null)
                throw new ArgumentNullException("taxRate");

            _taxRateRepository.Delete(taxRate);

            _cacheManager.RemoveByPattern(TAXRATE_PATTERN_KEY);
        }
コード例 #2
0
        public ActionResult AddTaxRate(ByRegionTaxRateListModel model)
        {
            if (!ModelState.IsValid)
            {
                return Configure();
            }

            var taxRate = new TaxRate()
            {
                TaxCategoryId = model.AddTaxCategoryId,
                CountryId = model.AddCountryId,
                StateProvinceId = model.AddStateProvinceId,
                Zip = model.AddZip,
                Percentage = model.AddPercentage
            };
            _taxRateService.InsertTaxRate(taxRate);

            return Configure();
        }