public ActionResult Configure() { var model = new RussianPostShippingModel(); model.GatewayUrl = _RussianPostSettings.GatewayUrl; model.Site = _RussianPostSettings.Site; model.Email = _RussianPostSettings.Email; return View("~/Plugins/Shipping.RussianPost/Views/ShippingRussianPost/Configure.cshtml", model); }
public ActionResult Configure(RussianPostShippingModel model) { if (!ModelState.IsValid) { return Configure(); } //save settings _RussianPostSettings.GatewayUrl = model.GatewayUrl; _RussianPostSettings.Site = model.Site; _RussianPostSettings.Email = model.Email; _settingService.SaveSetting(_RussianPostSettings); SuccessNotification(_localizationService.GetResource("Admin.Plugins.Saved")); return Configure(); }