public RedirectToRouteResult Index( [IoCModelBinder(typeof(ShippingMethodSettingsModelBinder))] ShippingMethodSettings settings) { _shippingMethodAdminService.UpdateSettings(settings); TempData.SuccessMessages().Add("Settings saved."); return(RedirectToAction("Index")); }
public ShippingMethodUIService(IKernel kernel, ShippingMethodSettings shippingMethodSettings) { _kernel = kernel; _enabledShippingMethods = shippingMethodSettings.GetEnabledMethods() .Select(type => _kernel.Get(type) as IShippingMethod) .ToHashSet(); }
public void UpdateSettings(ShippingMethodSettings settings) { _configurationProvider.SaveSettings(settings); }