Esempio n. 1
0
        public ActionResult AddPopup(string btnId, string formId, DHLModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings))
            {
                return(Content("Bu sayfaya erişim yetkiniz yoktur!"));
            }

            var sbw = new DHLRecord
            {
                StoreId          = model.StoreId,
                WarehouseId      = model.WarehouseId,
                CountryId        = model.CountryId,
                StateProvinceId  = model.StateProvinceId,
                Zip              = model.Zip == "*" ? null : model.Zip,
                ShippingMethodId = model.ShippingMethodId,
                From             = model.From,
                To          = model.To,
                Factor      = model.Factor,
                IsFixedRate = model.IsFixedRate,
                FixedRate   = model.FixedRate,
                FreeShippingOverXEnabled = model.FreeShippingOverXEnabled,
                FreeShippingOverXValue   = model.FreeShippingOverXValue
            };

            _dhlService.InsertDHLRecord(sbw);

            ViewBag.RefreshPage = true;
            ViewBag.btnId       = btnId;
            ViewBag.formId      = formId;

            return(View("~/Plugins/Shipping.DHL/Views/AddPopup.cshtml", model));
        }
Esempio n. 2
0
        public virtual void DeleteDHLRecord(DHLRecord dhlRecord)
        {
            if (dhlRecord == null)
            {
                throw new ArgumentNullException("dhlRecord");
            }

            _sbwRepository.Delete(dhlRecord);
            _cacheManager.RemoveByPattern(DHL_PATTERN_KEY);
        }