Пример #1
0
        public ActionResult Configure()
        {
            var model = new GlsShippingModel();

            model.GatewayUrl            = _glsSettings.GatewayUrl;
            model.Rate                  = _glsSettings.Rate;
            model.NumberOfSearchResults = _glsSettings.NumberOfSearchResults;

            return(View("~/Plugins/Shipping.Gls/Views/ShippingGls/Configure.cshtml", model));
        }
Пример #2
0
        public ActionResult Configure(GlsShippingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(Configure());
            }

            //save settings
            _glsSettings.GatewayUrl            = model.GatewayUrl;
            _glsSettings.Rate                  = model.Rate;
            _glsSettings.NumberOfSearchResults = model.NumberOfSearchResults;

            SuccessNotification(_localizationService.GetResource("Admin.Plugins.Saved"));

            return(Configure());
        }