public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (IsPostBack) { return; } VerifySitePermissions(ConfigManager.Permissions.WebSite.Configration); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, ELoadingType.ConfigurationCrossSiteTrans, null)); if (Body.IsQueryExists("CurrentChannelId")) { _currentChannelId = Body.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } RptContents.DataSource = DataProvider.ChannelDao.GetIdListByParentId(SiteId, 0); RptContents.ItemDataBound += RptContents_ItemDataBound; RptContents.DataBind(); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (IsPostBack) { return; } VerifySitePermissions(ConfigManager.SitePermissions.ConfigCrossSiteTrans); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, string.Empty, ELoadingType.ConfigurationCrossSiteTrans, null)); if (AuthRequest.IsQueryExists("CurrentChannelId")) { _currentChannelId = AuthRequest.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } var channelIdList = ChannelManager.GetChannelIdList(ChannelManager.GetChannelInfo(SiteId, SiteId), EScopeType.SelfAndChildren, string.Empty, string.Empty, string.Empty); RptContents.DataSource = channelIdList; RptContents.ItemDataBound += RptContents_ItemDataBound; RptContents.DataBind(); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); if (!IsPostBack) { BreadCrumb(AppManager.Cms.LeftMenu.IdCreate, AppManager.Cms.LeftMenu.Create.IdConfigurationCreate, "页面生成触发器", AppManager.Cms.Permission.WebSite.Create); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.ConfigurationCreateDetails, null)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = Body.GetQueryInt("CurrentNodeID"); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } BindGrid(); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (IsPostBack) { return; } VerifySitePermissions(ConfigManager.WebSitePermissions.Configration); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, string.Empty, ELoadingType.ConfigurationCrossSiteTrans, null)); if (AuthRequest.IsQueryExists("CurrentChannelId")) { _currentChannelId = AuthRequest.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } EBooleanUtils.AddListItems(RblIsCrossSiteTransChecked, "无需审核", "需要审核"); ControlUtils.SelectSingleItem(RblIsCrossSiteTransChecked, SiteInfo.Additional.IsCrossSiteTransChecked.ToString()); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (!IsPostBack) { VerifySitePermissions(ConfigManager.WebSitePermissions.Create); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, string.Empty, ELoadingType.ConfigurationCreateDetails, null)); if (AuthRequest.IsQueryExists("CurrentChannelId")) { _currentChannelId = AuthRequest.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } BindGrid(); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); if (!IsPostBack) { BreadCrumb(AppManager.Cms.LeftMenu.IdConfigration, "跨站转发设置", AppManager.Cms.Permission.WebSite.Configration); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.ConfigurationCrossSiteTrans, null)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = Body.GetQueryInt("CurrentNodeID"); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } BindGrid(); EBooleanUtils.AddListItems(IsCrossSiteTransChecked, "无需审核", "需要审核"); ControlUtils.SelectListItems(IsCrossSiteTransChecked, PublishmentSystemInfo.Additional.IsCrossSiteTransChecked.ToString()); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); _additional = new NameValueCollection(); if (!IsPostBack) { BreadCrumb(AppManager.Cms.LeftMenu.IdCreate, AppManager.Cms.LeftMenu.Create.IdConfigurationCreate, "页面命名规则", AppManager.Cms.Permission.WebSite.Create); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.TemplateFilePathRule, _additional)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = Body.GetQueryInt("CurrentNodeID"); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } rptContents.DataSource = DataProvider.NodeDao.GetNodeIdListByParentId(PublishmentSystemId, 0); rptContents.ItemDataBound += rptContents_ItemDataBound; rptContents.DataBind(); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (AuthRequest.IsQueryExists("channelId") && (AuthRequest.IsQueryExists("Subtract") || AuthRequest.IsQueryExists("Add"))) { var channelId = AuthRequest.GetQueryInt("channelId"); if (SiteId != channelId) { var isSubtract = AuthRequest.IsQueryExists("Subtract"); DataProvider.ChannelDao.UpdateTaxis(SiteId, channelId, isSubtract); AuthRequest.AddSiteLog(SiteId, channelId, 0, "栏目排序" + (isSubtract ? "上升" : "下降"), $"栏目:{ChannelManager.GetChannelName(SiteId, channelId)}"); PageUtils.Redirect(GetRedirectUrl(SiteId, channelId)); return; } } if (IsPostBack) { return; } ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, string.Empty, ELoadingType.Channel, null)); if (AuthRequest.IsQueryExists("CurrentChannelId")) { _currentChannelId = AuthRequest.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } LtlButtonsHead.Text = LtlButtonsFoot.Text = GetButtonsHtml(); var channelIdList = ChannelManager.GetChannelIdList(ChannelManager.GetChannelInfo(SiteId, SiteId), EScopeType.SelfAndChildren, string.Empty, string.Empty, string.Empty); RptContents.DataSource = channelIdList; RptContents.ItemDataBound += RptContents_ItemDataBound; RptContents.DataBind(); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); if (Body.IsQueryExists("NodeID") && (Body.IsQueryExists("Subtract") || Body.IsQueryExists("Add"))) { var nodeId = Body.GetQueryInt("NodeID"); if (PublishmentSystemId != nodeId) { var isSubtract = Body.IsQueryExists("Subtract"); DataProvider.NodeDao.UpdateTaxis(PublishmentSystemId, nodeId, isSubtract); Body.AddSiteLog(PublishmentSystemId, nodeId, 0, "栏目排序" + (isSubtract ? "上升" : "下降"), $"栏目:{NodeManager.GetNodeName(PublishmentSystemId, nodeId)}"); PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, nodeId)); return; } } if (!IsPostBack) { BreadCrumb(AppManager.Cms.LeftMenu.IdContent, "栏目管理", string.Empty); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.Channel, null)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = Body.GetQueryInt("CurrentNodeID"); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } ButtonPreLoad(); BindGrid(); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("siteId"); if (Body.IsQueryExists("channelId") && (Body.IsQueryExists("Subtract") || Body.IsQueryExists("Add"))) { var channelId = Body.GetQueryInt("channelId"); if (SiteId != channelId) { var isSubtract = Body.IsQueryExists("Subtract"); DataProvider.ChannelDao.UpdateTaxis(SiteId, channelId, isSubtract); Body.AddSiteLog(SiteId, channelId, 0, "栏目排序" + (isSubtract ? "上升" : "下降"), $"栏目:{ChannelManager.GetChannelName(SiteId, channelId)}"); PageUtils.Redirect(GetRedirectUrl(SiteId, channelId)); return; } } if (IsPostBack) { return; } ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(SiteInfo, ELoadingType.Channel, null)); if (Body.IsQueryExists("CurrentChannelId")) { _currentChannelId = Body.GetQueryInt("CurrentChannelId"); var onLoadScript = ChannelLoading.GetScriptOnLoad(SiteId, _currentChannelId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } PhAddChannel.Visible = HasChannelPermissionsIgnoreChannelId(ConfigManager.Permissions.Channel.ChannelAdd); if (PhAddChannel.Visible) { BtnAddChannel1.Attributes.Add("onclick", ModalChannelsAdd.GetOpenWindowString(SiteId, SiteId, GetRedirectUrl(SiteId, SiteId))); BtnAddChannel2.Attributes.Add("onclick", $"location.href='{PageChannelAdd.GetRedirectUrl(SiteId, SiteId, GetRedirectUrl(SiteId, 0))}';return false;"); } PhChannelEdit.Visible = HasChannelPermissionsIgnoreChannelId(ConfigManager.Permissions.Channel.ChannelEdit); if (PhChannelEdit.Visible) { var showPopWinString = ModalAddToGroup.GetOpenWindowStringToChannel(SiteId); BtnAddToGroup.Attributes.Add("onclick", showPopWinString); BtnSelectEditColumns.Attributes.Add("onclick", ModalSelectColumns.GetOpenWindowStringToChannel(SiteId, false)); } PhTranslate.Visible = HasChannelPermissionsIgnoreChannelId(ConfigManager.Permissions.Channel.ChannelTranslate); if (PhTranslate.Visible) { BtnTranslate.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValue( PageChannelTranslate.GetRedirectUrl(SiteId, GetRedirectUrl(SiteId, _currentChannelId)), "ChannelIDCollection", "ChannelIDCollection", "请选择需要转移的栏目!")); } PhDelete.Visible = HasChannelPermissionsIgnoreChannelId(ConfigManager.Permissions.Channel.ChannelDelete); if (PhDelete.Visible) { BtnDelete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValue(PageChannelDelete.GetRedirectUrl(SiteId, GetRedirectUrl(SiteId, SiteId)), "ChannelIDCollection", "ChannelIDCollection", "请选择需要删除的栏目!")); } PhCreate.Visible = HasSitePermissions(ConfigManager.Permissions.WebSite.Create) || HasChannelPermissionsIgnoreChannelId(ConfigManager.Permissions.Channel.CreatePage); if (PhCreate.Visible) { BtnCreate.Attributes.Add("onclick", ModalCreateChannels.GetOpenWindowString(SiteId)); } PhImport.Visible = PhAddChannel.Visible; if (PhImport.Visible) { BtnImport.Attributes.Add("onclick", ModalChannelImport.GetOpenWindowString(SiteId, SiteId)); } BtnExport.Attributes.Add("onclick", ModalExportMessage.GetOpenWindowStringToChannel(SiteId, "ChannelIDCollection", "请选择需要导出的栏目!")); RptContents.DataSource = DataProvider.ChannelDao.GetIdListByParentId(SiteId, 0); RptContents.ItemDataBound += RptContents_ItemDataBound; RptContents.DataBind(); }
public void Page_Load(object sender, EventArgs e) { if (Body.IsQueryExists("NodeID") && (Body.IsQueryExists("Subtract") || Body.IsQueryExists("Add"))) { var nodeId = Body.GetQueryInt("NodeID"); if (PublishmentSystemId != nodeId) { var isSubtract = Body.IsQueryExists("Subtract"); DataProvider.NodeDao.UpdateTaxis(PublishmentSystemId, nodeId, isSubtract); Body.AddSiteLog(PublishmentSystemId, nodeId, 0, "栏目排序" + (isSubtract ? "上升" : "下降"), $"栏目:{NodeManager.GetNodeName(PublishmentSystemId, nodeId)}"); PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, nodeId)); return; } } else if (Body.IsQueryExists("Delete") && Body.IsQueryExists("ChannelIDCollection")) { var channelIdList = TranslateUtils.StringCollectionToIntList(Body.GetPostString("ChannelIDCollection")); if (channelIdList.Count > 0) { foreach (var nodeId in channelIdList) { DataProvider.NodeDao.Delete(nodeId); } } PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, 0)); return; } if (IsPostBack) { return; } BreadCrumbWithItemTitle(AppManager.Wcm.LeftMenu.IdGovPublic, AppManager.Wcm.LeftMenu.GovPublic.IdGovPublicContentConfiguration, "分类法管理", "主题分类", AppManager.Wcm.Permission.WebSite.GovPublicContentConfiguration); ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.GovPublicChannel, null)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = TranslateUtils.ToInt(Request.QueryString["CurrentNodeID"]); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } AddChannel.Attributes.Add("onclick", ModalGovPublicChannelAdd.GetOpenWindowStringToAdd(PublishmentSystemId, string.Empty)); Delete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert( PageUtils.GetWcmUrl(nameof(PageGovPublicChannel), new NameValueCollection { { "siteId", PublishmentSystemId.ToString() }, { "Delete", true.ToString() } }), "ChannelIDCollection", "ChannelIDCollection", "请选择需要删除的节点!", "此操作将删除对应节点以及所有下级节点,确认删除吗?")); BindGrid(); }
public void Page_Load(object sender, EventArgs e) { if (Request.QueryString["NodeID"] != null && (Request.QueryString["Subtract"] != null || Request.QueryString["Add"] != null)) { var nodeId = int.Parse(Request.QueryString["NodeID"]); if (PublishmentSystemId != nodeId) { var isSubtract = Request.QueryString["Subtract"] != null; DataProvider.NodeDao.UpdateTaxis(PublishmentSystemId, nodeId, isSubtract); Body.AddSiteLog(PublishmentSystemId, nodeId, 0, "栏目排序" + (isSubtract ? "上升" : "下降"), $"栏目:{NodeManager.GetNodeName(PublishmentSystemId, nodeId)}"); PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, nodeId)); return; } } else if (Request.QueryString["Delete"] != null && Request.QueryString["ChannelIDCollection"] != null) { var channelIdArrayList = TranslateUtils.StringCollectionToIntList(Request.QueryString["ChannelIDCollection"]); if (channelIdArrayList.Count > 0) { foreach (var nodeId in channelIdArrayList) { DataProvider.NodeDao.Delete(nodeId); } } PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, 0)); return; } if (!IsPostBack) { BreadCrumb(AppManager.Wcm.LeftMenu.IdGovInteract, AppManager.Wcm.LeftMenu.GovInteract.IdGovInteractConfiguration, "互动交流分类", AppManager.Wcm.Permission.WebSite.GovInteractConfiguration); if (PublishmentSystemInfo.Additional.GovInteractNodeId == 0) { PageUtils.Redirect(PageGovInteractConfiguration.GetRedirectUrl(PublishmentSystemId)); return; } ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.GovInteractChannel, null)); if (Body.IsQueryExists("CurrentNodeID")) { _currentNodeId = TranslateUtils.ToInt(Request.QueryString["CurrentNodeID"]); var onLoadScript = ChannelLoading.GetScriptOnLoad(PublishmentSystemId, _currentNodeId); if (!string.IsNullOrEmpty(onLoadScript)) { ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript); } } AddChannel.Attributes.Add("onclick", ModalGovInteractChannelAdd.GetOpenWindowStringToAdd(PublishmentSystemId, string.Empty)); Delete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert( PageUtils.GetWcmUrl(nameof(PageGovInteractChannel), new NameValueCollection { { "siteId", PublishmentSystemId.ToString() }, { "Delete", true.ToString() } }), "ChannelIDCollection", "ChannelIDCollection", "请选择需要删除的节点!", "此操作将删除对应节点以及所有下级节点,确认删除吗?")); rptContents.DataSource = DataProvider.NodeDao.GetNodeIdListByParentId(PublishmentSystemId, PublishmentSystemInfo.Additional.GovInteractNodeId); rptContents.ItemDataBound += rptContents_ItemDataBound; rptContents.DataBind(); } }