示例#1
0
        public IActionResult EditGlobalSettings(EditGlobalSettingsModel model)
        {
            GlobalSettings settings = model.AsGlobalSettings();

            GlobalSettingsSingle.Instance().SetGlobalSettings(settings);
            GlobalSettings resultEntity = globalSettingsService.EditGlobalSettings(settings);

            if (resultEntity != null)
            {
                return(Json(new StatusMessageData(StatusMessageType.Success, "保存成功!")));
            }
            return(Json(new StatusMessageData(StatusMessageType.Error, "保存失败!")));
        }
示例#2
0
        public IActionResult ManageGlobalSettings()
        {
            GlobalSettings          singleSettings          = GlobalSettingsSingle.Instance().GetGlobalSettings();
            EditGlobalSettingsModel editGlobalSettingsModel = new EditGlobalSettingsModel()
            {
                GlobalFreeMoneySetting   = singleSettings.GlobalFreeMoneySetting,
                GlobalFreightSetting     = singleSettings.GlobalFreightSetting,
                GlobalOrderSetting       = singleSettings.GlobalOrderSetting,
                GlobalReturnGoodsSetting = singleSettings.GlobalReturnGoodsSetting
            };

            return(View(editGlobalSettingsModel));
        }