/// <summary> /// 更新内容 /// </summary> protected void cmdUpdate_Click(object sender, EventArgs e) { try { DNNGo_ThemePlugin_Menu menu = MenuItem; menu.MenuWidth = WebHelper.GetIntParam(Request, txtMegaMenuWidth.UniqueID, 0); menu.MenuType = WebHelper.GetIntParam(Request, ddlMenuType.UniqueID, 0); List <KeyValueEntity> Options = menu.SettingItems; Options = UpdateSettings(Options, "MegaPosition", WebHelper.GetStringParam(Request, ddlMegaPosition.UniqueID, "0")); menu.Options = Options.ToJson(); menu.LastIP = WebHelper.UserHost; menu.LastTime = DateTime.Now; menu.LastUser = UserId; if (menu.ID > 0) { menu.Update(); } else { menu.PortalId = PortalId; menu.TabID = EditTabID; menu.ModuleId = ModuleId; menu.Insert(); } mTips.LoadMessage("SaveOptionsSuccess", EnumTips.Success, this, new String[] { }); Response.Redirect(WebHelper.GetScriptUrl, false); //String GoUrl = String.Format("{0}?PortalId={1}&TabID={2}&Token={3}&SkinFileName={4}#tabs-box-{3}", "Resource_Options.aspx", PortalId, TabId, "Options", ""); //Response.Redirect(GoUrl,false); } catch (Exception exc) { ProcessModuleLoadException(exc); } }
/// <summary> /// 设置全局选项 /// </summary> public void SetGlobal() { if (EditTabID != Int32.MaxValue) { DNNGo_ThemePlugin_Menu Item = ContentItem; if (Token.IndexOf("Background", StringComparison.CurrentCultureIgnoreCase) >= 0) { Item.Globals_Background = WebHelper.GetIntParam(Request, rblUseGlobalSettings.UniqueID, 1); } else { Item.Globals_Breadcrumb = WebHelper.GetIntParam(Request, rblUseGlobalSettings.UniqueID, 1); } Item.LastIP = WebHelper.UserHost; Item.LastTime = DateTime.Now; Item.LastUser = UserId; if (Item != null && Item.ID > 0) { Item.Update(); } else { Item.PortalId = PortalId; Item.Language = "en-US"; Item.ModuleId = ModuleId; //Item.Position = (Int32)EnumPosition.Top; Item.TabID = EditTabID; Item.Insert(); } } }