Ejemplo n.º 1
0
        private void DgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var groupName = SqlUtils.EvalString(e.Item.DataItem, "NodeGroupName");

                var upLinkButton   = (HyperLink)e.Item.FindControl("UpLinkButton");
                var downLinkButton = (HyperLink)e.Item.FindControl("DownLinkButton");

                upLinkButton.NavigateUrl = PageUtils.GetCmsUrl(nameof(PageNodeGroup), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "GroupName", groupName },
                    { "SetTaxis", true.ToString() },
                    { "Direction", "UP" }
                });
                downLinkButton.NavigateUrl = PageUtils.GetCmsUrl(nameof(PageNodeGroup), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "GroupName", groupName },
                    { "SetTaxis", true.ToString() },
                    { "Direction", "DOWN" }
                });
            }
        }
Ejemplo n.º 2
0
        public void Page_Load(object sender, EventArgs e)
        {
            PageUtils.CheckRequestParameter("PublishmentSystemID");

            if (IsPostBack)
            {
                return;
            }

            LtlCategoryChannel.Text = string.Format($@"<a href='{PageContent.GetRedirectUrl(PublishmentSystemId, PublishmentSystemInfo.Additional.GovPublicNodeId)}' isLink='true' onclick='fontWeightLink(this)' target='content'>主题分类</a>");

            ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.GovPublicChannelTree, null));

            var additional = new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                {
                    "DepartmentIDCollection",
                    TranslateUtils.ObjectCollectionToString(
                        GovPublicManager.GetFirstDepartmentIdList(PublishmentSystemInfo))
                }
            };

            ClientScriptRegisterClientScriptBlock("DepartmentTreeScript", DepartmentTreeItem.GetScript(EDepartmentLoadingType.ContentTree, additional));

            var categoryClassInfoArrayList = DataProvider.GovPublicCategoryClassDao.GetCategoryClassInfoArrayList(PublishmentSystemId, ETriState.False, ETriState.True);

            foreach (GovPublicCategoryClassInfo categoryClassInfo in categoryClassInfoArrayList)
            {
                ClientScriptRegisterClientScriptBlock("CategoryTreeScript_" + categoryClassInfo.ClassCode, GovPublicCategoryTreeItem.GetScript(categoryClassInfo.ClassCode, PublishmentSystemId, EGovPublicCategoryLoadingType.Tree, null));
            }

            BindGrid(categoryClassInfoArrayList);
        }
Ejemplo n.º 3
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID");

            SpContents.ControlToPaginate = RptContents;
            RptContents.ItemDataBound   += RptContents_ItemDataBound;
            SpContents.ItemsPerPage      = PublishmentSystemInfo.Additional.PageSize;

            SpContents.SelectCommand = BaiRongDataProvider.ContentDao.GetSelectCommendByHitsAnalysis(PublishmentSystemInfo.AuxiliaryTableForContent, PublishmentSystemId);

            SpContents.SortField = ContentAttribute.Hits;
            SpContents.SortMode  = SortMode.DESC;

            _pageUrl = PageUtils.GetAnalysisUrl(nameof(PageAnalysisContentHits), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() }
            });

            if (IsPostBack)
            {
                return;
            }

            if (PublishmentSystemId > 0)
            {
                BreadCrumb(AppManager.Cms.LeftMenu.IdFunction, AppManager.Cms.LeftMenu.Function.IdSiteAnalysis, "内容点击量排名", AppManager.Cms.Permission.WebSite.SiteAnalysis);
            }
            else
            {
                BreadCrumbAnalysis(AppManager.Analysis.LeftMenu.Chart, "内容点击量排名", AppManager.Analysis.Permission.AnalysisChart);
            }

            SpContents.DataBind();

            foreach (var contentId in _contentIdList)
            {
                var yValueHits      = GetYHashtable(contentId, YTypeHits);
                var yValueHitsDay   = GetYHashtable(contentId, YTypeHitsDay);
                var yValueHitsWeek  = GetYHashtable(contentId, YTypeHitsWeek);
                var yValueHitsMonth = GetYHashtable(contentId, YTypeHitsMonth);
                var xValue          = GetXHashtable(contentId);
                if (xValue.Length > 10)
                {
                    xValue = xValue.Substring(0, 10);
                }

                LtlArray.Text += $@"
xArrayHits.push('{xValue}');
yArrayHits.push('{yValueHits}');
yArrayHitsDay.push('{yValueHitsDay}');
yArrayHitsWeek.push('{yValueHitsWeek}');
yArrayHitsMonth.push('{yValueHitsMonth}');
";
            }
        }
Ejemplo n.º 4
0
        void MyDataGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var ltlTitle = (Literal)e.Item.FindControl("ltlTitle");

                var pageContentIdWithAccessNum = e.Item.DataItem as PageContentIDWithAccessNum;

                if (pageContentIdWithAccessNum != null && pageContentIdWithAccessNum.PageContentID > 0)
                {
                    var contentInfo = DataProvider.ContentDao.GetContentInfo(ETableStyle.BackgroundContent, PublishmentSystemInfo.AuxiliaryTableForContent, pageContentIdWithAccessNum.PageContentID);
                    if (contentInfo != null && !string.IsNullOrEmpty(contentInfo.Title))
                    {
                        ltlTitle.Text = WebUtils.GetContentTitle(PublishmentSystemInfo, contentInfo,
                                                                 PageUtils.GetCmsUrl(nameof(PageTrackerContentRank), new NameValueCollection
                        {
                            { "PublishmentSystemID", PublishmentSystemId.ToString() }
                        }));
                    }
                    else
                    {
                        e.Item.Visible = false;
                    }
                }
            }
        }
        //PageUtils.GetWcmUrl(nameof(ModalGovInteractDepartmentSelect), new NameValueCollection())$"modal_govInteractDepartmentSelect.aspx?PublishmentSystemID={PublishmentSystemID}" + "&DepartmentID={0}"));

        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            _nodeId = TranslateUtils.ToInt(Request.QueryString["NodeID"]);
            _additional.Add("UrlFormatString",
                            PageUtils.GetWcmUrl(nameof(ModalGovInteractDepartmentSelect), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() }
            }));

            if (!IsPostBack)
            {
                if (Body.IsQueryExists("DepartmentID"))
                {
                    var    departmentId   = TranslateUtils.ToInt(Request.QueryString["DepartmentID"]);
                    var    departmentName = DepartmentManager.GetDepartmentName(departmentId);
                    string scripts        = $"window.parent.showCategoryDepartment('{departmentName}', '{departmentId}');";
                    PageUtils.CloseModalPageWithoutRefresh(Page, scripts);
                }
                else
                {
                    ClientScriptRegisterClientScriptBlock("NodeTreeScript", DepartmentTreeItem.GetScript(EDepartmentLoadingType.DepartmentSelect, _additional));
                    BindGrid();
                }
            }
        }
Ejemplo n.º 6
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var relatedFieldID   = SqlUtils.EvalInt(e.Item.DataItem, "RelatedFieldID");
                var relatedFieldName = SqlUtils.EvalString(e.Item.DataItem, "RelatedFieldName");
                var totalLevel       = SqlUtils.EvalInt(e.Item.DataItem, "TotalLevel");

                var ltlRelatedFieldName = (Literal)e.Item.FindControl("ltlRelatedFieldName");
                var ltlTotalLevel       = (Literal)e.Item.FindControl("ltlTotalLevel");
                var ltlItemsUrl         = (Literal)e.Item.FindControl("ltlItemsUrl");
                var ltlEditUrl          = (Literal)e.Item.FindControl("ltlEditUrl");
                var ltlExportUrl        = (Literal)e.Item.FindControl("ltlExportUrl");
                var ltlDeleteUrl        = (Literal)e.Item.FindControl("ltlDeleteUrl");

                ltlRelatedFieldName.Text = relatedFieldName;
                ltlTotalLevel.Text       = totalLevel.ToString();
                var urlItems = PageRelatedFieldMain.GetRedirectUrl(PublishmentSystemId, relatedFieldID, totalLevel);
                ltlItemsUrl.Text = $@"<a href=""{urlItems}"">管理字段项</a>";

                ltlEditUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalRelatedFieldAdd.GetOpenWindowString(
                        PublishmentSystemId, relatedFieldID)}"">编辑</a>";
                ltlExportUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalExportMessage.GetOpenWindowStringToRelatedField(PublishmentSystemId, relatedFieldID)}"">导出</a>";
                ltlDeleteUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{PageUtils.GetRedirectStringWithConfirm(
                        PageUtils.GetCmsUrl(nameof(PageRelatedField), new NameValueCollection
                        {
                            {"PublishmentSystemID", PublishmentSystemId.ToString()},
                            {"RelatedFieldID", relatedFieldID.ToString()},
                            {"Delete", true.ToString()}
                        }), " 确认删除此联动字段吗? ")}" ">删除</a>";
            }
        }
Ejemplo n.º 7
0
        public string GetDeleteHtml(string innerLinkName)
        {
            var retval  = string.Empty;
            var canEdit = false;

            if (PublishmentSystemId != 0)
            {
                if (DataProvider.InnerLinkDao.IsExactExists(innerLinkName, PublishmentSystemId))
                {
                    canEdit = true;
                }
            }
            else
            {
                canEdit = true;
            }
            if (canEdit)
            {
                var urlInnerLink = PageUtils.GetCmsUrl(nameof(PageInnerLink), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "InnerLinkName", innerLinkName },
                    { "Delete", true.ToString() }
                });
                retval =
                    $"<a href=\"{urlInnerLink}\" onClick=\"javascript:return confirm('此操作将删除内部链接“{innerLinkName}”,确认吗?');\">删除</a>";
            }
            return(retval);
        }
Ejemplo n.º 8
0
 public void Check_OnClick(object sender, EventArgs e)
 {
     if (Page.IsPostBack && Page.IsValid)
     {
         if (Request.Form["ContentIDCollection"] != null)
         {
             var arraylist = TranslateUtils.StringCollectionToIntList(Request.Form["ContentIDCollection"]);
             try
             {
                 DataProvider.InputContentDao.Check(arraylist);
                 Body.AddSiteLog(PublishmentSystemId, "审核提交表单内容", $"提交表单:{_inputInfo.InputName}");
                 SuccessMessage("审核成功!");
                 PageUtils.Redirect(PageUtils.GetCmsUrl(nameof(PageInputContent), new NameValueCollection
                 {
                     { "PublishmentSystemID", PublishmentSystemId.ToString() },
                     { "InputName", _inputInfo.InputName }
                 }));
             }
             catch (Exception ex)
             {
                 FailMessage(ex, "审核失败!");
             }
         }
         else
         {
             FailMessage("删除失败,请选择需要审核的内容!");
         }
     }
 }
Ejemplo n.º 9
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            _isProtocol = Body.GetQueryBool("isProtocol");
            _jsMethod   = Body.GetQueryString("jsMethod");
            _itemIndex  = Body.GetQueryInt("itemIndex");

            _additional.Add("isProtocol", _isProtocol.ToString());
            _additional.Add("jsMethod", _jsMethod);
            _additional.Add("itemIndex", _itemIndex.ToString());

            if (!IsPostBack)
            {
                if (Body.IsQueryExists("NodeID"))
                {
                    var nodeId    = Body.GetQueryInt("NodeID");
                    var nodeNames = NodeManager.GetNodeNameNavigation(PublishmentSystemId, nodeId);

                    if (!string.IsNullOrEmpty(_jsMethod))
                    {
                        string scripts = $"window.parent.{_jsMethod}({_itemIndex}, '{nodeNames}', {nodeId});";
                        PageUtils.CloseModalPageWithoutRefresh(Page, scripts);
                    }
                    else
                    {
                        var pageUrl = PageUtility.GetChannelUrl(PublishmentSystemInfo, NodeManager.GetNodeInfo(PublishmentSystemId, nodeId));
                        if (_isProtocol)
                        {
                            pageUrl = PageUtils.AddProtocolToUrl(pageUrl);
                        }

                        string scripts = $"window.parent.selectChannel('{nodeNames}', '{nodeId}', '{pageUrl}');";
                        PageUtils.CloseModalPageWithoutRefresh(Page, scripts);
                    }
                }
                else
                {
                    var nodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, PublishmentSystemId);

                    var linkUrl = PageUtils.GetCmsUrl(nameof(ModalChannelSelect), new NameValueCollection
                    {
                        { "PublishmentSystemID", PublishmentSystemId.ToString() },
                        { "NodeID", nodeInfo.NodeId.ToString() },
                        { "isProtocol", _isProtocol.ToString() },
                        { "jsMethod", _jsMethod },
                        { "itemIndex", _itemIndex.ToString() }
                    });
                    ltlPublishmentSystem.Text = $"<a href='{linkUrl}'>{nodeInfo.NodeName}</a>";
                    ClientScriptRegisterClientScriptBlock("NodeTreeScript", ChannelLoading.GetScript(PublishmentSystemInfo, ELoadingType.ChannelSelect, null));
                    BindGrid();
                }
            }
        }
Ejemplo n.º 10
0
 public string GetNoAutoCreateClickString()
 {
     return(PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(
                PageUtils.GetCmsUrl(nameof(PageGatherRule), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "NoAuto", true.ToString() }
     }), "GatherRuleNameCollection", "GatherRuleNameCollection", "请选择需要打开自动生成的规则!", "确认要设置所选规则为自动生成吗?"));
 }
Ejemplo n.º 11
0
 public void btnSearch_Click(object sender, EventArgs e)
 {
     PageUtils.Redirect(PageUtils.GetCmsUrl(nameof(PageTemplate), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "templateType", DdlTemplateType.SelectedValue },
         { "keywords", TbKeywords.Text }
     }));
 }
Ejemplo n.º 12
0
 private string GetRedirectUrl(string path)
 {
     return(PageUtils.GetCmsUrl(nameof(ModalSelectImage), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "RootPath", _rootPath },
         { "CurrentRootPath", path },
         { "TextBoxClientID", _textBoxClientId }
     }));
 }
Ejemplo n.º 13
0
        public string GetContentsHtml(string groupName)
        {
            var urlGroup = PageUtils.GetCmsUrl(nameof(PageContentGroup), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "contentGroupName", groupName }
            });

            return($"<a href=\"{urlGroup}\">查看内容</a>");
        }
Ejemplo n.º 14
0
 public void NodeIDDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     PageUtils.Redirect(PageUtils.GetCmsUrl(nameof(PageTrackerContentAnalysis), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "NodeID", NodeIDDropDownList.SelectedValue },
         { "StartDateString", startDateString },
         { "EndDateString", endDateString }
     }));
 }
Ejemplo n.º 15
0
 public void DdlLogId_SelectedIndexChanged(object sender, EventArgs e)
 {
     PageUtils.Redirect(PageUtils.GetCmsUrl(nameof(ModalTemplateRestore), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "templateID", _templateId.ToString() },
         { "includeUrl", _includeUrl },
         { "logID", DdlLogId.SelectedValue }
     }));
 }
Ejemplo n.º 16
0
 public void Analysis_OnClick(object sender, EventArgs e)
 {
     PageUtils.Redirect(PageUtils.GetCmsUrl(nameof(PageTrackerContentAnalysis), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "NodeID", nodeID.ToString() },
         { "StartDateString", StartDate.Text },
         { "EndDateString", EndDate.Text }
     }));
 }
Ejemplo n.º 17
0
        public void Page_Load(object sender, EventArgs e)
        {
            var classCode = Body.GetQueryString("ClassCode");

            _categoryClassInfo = DataProvider.GovPublicCategoryClassDao.GetCategoryClassInfo(classCode, PublishmentSystemId);

            if (Body.IsQueryExists("Delete") && Body.IsQueryExists("CategoryIDCollection"))
            {
                var categoryIdList = TranslateUtils.StringCollectionToIntList(Body.GetQueryString("CategoryIDCollection"));
                foreach (var categoryId in categoryIdList)
                {
                    DataProvider.GovPublicCategoryDao.Delete(categoryId);
                }
                SuccessMessage("成功删除所选节点");
            }
            else if (Body.IsQueryExists("CategoryID") && (Body.IsQueryExists("Subtract") || Body.IsQueryExists("Add")))
            {
                var categoryId = Body.GetQueryInt("CategoryID");
                var isSubtract = Body.IsQueryExists("Subtract");
                DataProvider.GovPublicCategoryDao.UpdateTaxis(_categoryClassInfo.ClassCode, PublishmentSystemId, categoryId, isSubtract);

                PageUtils.Redirect(GetRedirectUrl(PublishmentSystemId, _categoryClassInfo.ClassCode, categoryId));
                return;
            }

            if (!IsPostBack)
            {
                BreadCrumbWithItemTitle(AppManager.Wcm.LeftMenu.IdGovPublic, AppManager.Wcm.LeftMenu.GovPublic.IdGovPublicContentConfiguration, "分类法管理", ClassName + "分类", AppManager.Wcm.Permission.WebSite.GovPublicContentConfiguration);

                ClientScriptRegisterClientScriptBlock("NodeTreeScript", GovPublicCategoryTreeItem.GetScript(_categoryClassInfo.ClassCode, PublishmentSystemId, EGovPublicCategoryLoadingType.List, null));

                if (Body.IsQueryExists("CurrentCategoryID"))
                {
                    _currentCategoryId = TranslateUtils.ToInt(Request.QueryString["CurrentCategoryID"]);
                    var onLoadScript = GetScriptOnLoad(_currentCategoryId);
                    if (!string.IsNullOrEmpty(onLoadScript))
                    {
                        ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript);
                    }
                }

                BtnAddChannel.Attributes.Add("onclick", ModalGovPublicCategoryAdd.GetOpenWindowStringToAdd(_categoryClassInfo.ClassCode, PublishmentSystemId, GetRedirectUrl(PublishmentSystemId, _categoryClassInfo.ClassCode, 0)));

                BtnDelete.Attributes.Add("onclick",
                                         PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(
                                             PageUtils.GetWcmUrl(nameof(PageGovPublicCategory), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "ClassCode", _categoryClassInfo.ClassCode },
                    { "Delete", true.ToString() },
                }), "CategoryIDCollection", "CategoryIDCollection", "请选择需要删除的节点!", "此操作将删除对应节点以及所有下级节点,确认删除吗?"));

                BindGrid();
            }
        }
Ejemplo n.º 18
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var seoMetaID   = SqlUtils.EvalInt(e.Item.DataItem, "SeoMetaID");
                var seoMetaName = SqlUtils.EvalString(e.Item.DataItem, "SeoMetaName");
                var pageTitle   = SqlUtils.EvalString(e.Item.DataItem, "PageTitle");
                var isDefault   = TranslateUtils.ToBool(SqlUtils.EvalString(e.Item.DataItem, "IsDefault"));

                var ltlSeoMetaName = e.Item.FindControl("ltlSeoMetaName") as Literal;
                var ltlPageTitle   = e.Item.FindControl("ltlPageTitle") as Literal;
                var ltlIsDefault   = e.Item.FindControl("ltlIsDefault") as Literal;
                var hlViewLink     = e.Item.FindControl("hlViewLink") as HyperLink;
                var hlEditLink     = e.Item.FindControl("hlEditLink") as HyperLink;
                var ltlDefaultUrl  = e.Item.FindControl("ltlDefaultUrl") as Literal;
                var ltlDeleteUrl   = e.Item.FindControl("ltlDeleteUrl") as Literal;

                ltlSeoMetaName.Text = seoMetaName;
                ltlPageTitle.Text   = pageTitle;
                ltlIsDefault.Text   = StringUtils.GetTrueImageHtml(isDefault);
                hlViewLink.Attributes.Add("onclick", ModalSeoMetaView.GetOpenWindowString(PublishmentSystemId, seoMetaID));
                hlEditLink.Attributes.Add("onclick", ModalSeoMetaAdd.GetOpenWindowStringToEdit(PublishmentSystemId, seoMetaID));
                if (!isDefault)
                {
                    var urlDefault = PageUtils.GetCmsUrl(nameof(PageSeoMetaList), new NameValueCollection
                    {
                        { "PublishmentSystemID", PublishmentSystemId.ToString() },
                        { "SeoMetaID", seoMetaID.ToString() },
                        { "SetDefault", true.ToString() }
                    });
                    ltlDefaultUrl.Text =
                        $@"<a href=""{urlDefault}"" onClick=""javascript:return confirm('此操作将把此项设为默认,确认吗?');"">设为默认</a>";
                }
                else
                {
                    var urlDefault = PageUtils.GetCmsUrl(nameof(PageSeoMetaList), new NameValueCollection
                    {
                        { "PublishmentSystemID", PublishmentSystemId.ToString() },
                        { "SeoMetaID", seoMetaID.ToString() },
                        { "SetDefault", false.ToString() }
                    });
                    ltlDefaultUrl.Text =
                        $@"<a href=""{urlDefault}"" onClick=""javascript:return confirm('此操作将取消默认,确认吗?');"">取消默认</a>";
                }

                var urlDelete = PageUtils.GetCmsUrl(nameof(PageSeoMetaList), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "SeoMetaID", seoMetaID.ToString() },
                    { "Delete", true.ToString() }
                });
                ltlDeleteUrl.Text =
                    $@"<a href=""{urlDelete}"" onClick=""javascript:return confirm('此操作将删除页面元数据“{seoMetaName}”,确认吗?');"">删除</a>";
            }
        }
Ejemplo n.º 19
0
 public string GetRedirectUrl(string targetPublishmentSystemId, string targetNodeId)
 {
     return(PageUtils.GetCmsUrl(nameof(ModalChannelMultipleSelect), new NameValueCollection
     {
         { "publishmentSystemID", PublishmentSystemId.ToString() },
         { "isPublishmentSystemSelect", _isPublishmentSystemSelect.ToString() },
         { "jsMethod", _jsMethod },
         { "targetPublishmentSystemID", targetPublishmentSystemId },
         { "targetNodeID", targetNodeId }
     }));
 }
Ejemplo n.º 20
0
        public string GetDeleteHtml(string groupName)
        {
            var urlDelete = PageUtils.GetCmsUrl(nameof(PageNodeGroup), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "GroupName", groupName },
                { "Delete", true.ToString() }
            });

            return($"<a href=\"{urlDelete}\" onClick=\"javascript:return confirm('此操作将删除栏目组“{groupName}”,确认吗?');\">删除</a>");
        }
Ejemplo n.º 21
0
        public void Analysis_OnClick(object sender, EventArgs e)
        {
            var pageUrl = PageUtils.GetAnalysisUrl(nameof(PageAnalysisAdminWork), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "StartDate", TbStartDate.Text },
                { "EndDate", TbEndDate.Text }
            });

            PageUtils.Redirect(pageUrl);
        }
Ejemplo n.º 22
0
        public string GetRemoveHtml(string groupName, int contentId)
        {
            var urlGroup = PageUtils.GetCmsUrl(nameof(PageContentsGroup), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "contentGroupName", groupName },
                { "Remove", true.ToString() }
            });

            return
                ($"<a href=\"{urlGroup}\" onClick=\"javascript:return confirm('此操作将从内容组“{groupName}”移除该内容,确认吗?');\">移除</a>");
        }
Ejemplo n.º 23
0
 public override void Submit_OnClick(object sender, EventArgs e)
 {
     if (Page.IsPostBack && Page.IsValid)
     {
         PublishmentSystemInfo.Additional.GovPublicDepartmentIdCollection = Request.Form["DepartmentIDCollection"];
         DataProvider.PublishmentSystemDao.Update(PublishmentSystemInfo);
         SuccessMessage("可选择部门设置成功");
         AddWaitAndRedirectScript(PageUtils.GetWcmUrl(nameof(PageGovPublicDepartmentSelect), new NameValueCollection
         {
             { "PublishmentSystemID", PublishmentSystemId.ToString() }
         }));
     }
 }
Ejemplo n.º 24
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (Body.IsQueryExists("Delete") && Body.IsQueryExists("DepartmentIDCollection"))
            {
                var departmentIdArrayList = TranslateUtils.StringCollectionToIntList(Request.QueryString["DepartmentIDCollection"]);
                foreach (var departmentId in departmentIdArrayList)
                {
                    BaiRongDataProvider.DepartmentDao.Delete(departmentId);
                }
                SuccessMessage("成功删除所选部门");
            }
            else if (Body.IsQueryExists("DepartmentID") && (Body.IsQueryExists("Subtract") || Body.IsQueryExists("Add")))
            {
                var departmentId = int.Parse(Request.QueryString["DepartmentID"]);
                var isSubtract   = Body.IsQueryExists("Subtract");
                BaiRongDataProvider.DepartmentDao.UpdateTaxis(departmentId, isSubtract);

                PageUtils.Redirect(GetRedirectUrl(departmentId));
                return;
            }

            _additional["siteId"] = PublishmentSystemId.ToString();

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.Wcm.LeftMenu.IdGovPublic, AppManager.Wcm.LeftMenu.GovPublic.IdGovPublicContentConfiguration, "机构分类设置", AppManager.Wcm.Permission.WebSite.GovPublicContentConfiguration);

                ClientScriptRegisterClientScriptBlock("NodeTreeScript", DepartmentTreeItem.GetScript(EDepartmentLoadingType.GovPublicDepartment, _additional));

                if (Body.IsQueryExists("CurrentDepartmentID"))
                {
                    _currentDepartmentId = TranslateUtils.ToInt(Request.QueryString["CurrentDepartmentID"]);
                    var onLoadScript = GetScriptOnLoad(_currentDepartmentId);
                    if (!string.IsNullOrEmpty(onLoadScript))
                    {
                        ClientScriptRegisterClientScriptBlock("NodeTreeScriptOnLoad", onLoadScript);
                    }
                }

                AddDepartment.Attributes.Add("onclick", ModalGovPublicDepartmentAdd.GetOpenWindowStringToAdd(PublishmentSystemId, GetRedirectUrl(0)));

                Delete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUtils.GetWcmUrl(nameof(PageGovPublicDepartment), new NameValueCollection
                {
                    { "siteId", PublishmentSystemId.ToString() },
                    { "Delete", true.ToString() }
                }), "DepartmentIDCollection", "DepartmentIDCollection", "请选择需要删除的部门!", "此操作将删除对应部门以及所有下级部门,确认删除吗?"));

                BindGrid();
            }
        }
Ejemplo n.º 25
0
        void rptChannels_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            var nodeId  = (int)e.Item.DataItem;
            var enabled = IsOwningNodeId(nodeId);

            if (!enabled)
            {
                if (!IsHasChildOwningNodeId(nodeId))
                {
                    e.Item.Visible = false;
                }
            }
            var nodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, nodeId);

            var ltlEditLink      = (Literal)e.Item.FindControl("ltlEditLink");
            var ltlNodeTitle     = (Literal)e.Item.FindControl("ltlNodeTitle");
            var ltlNodeIndexName = (Literal)e.Item.FindControl("ltlNodeIndexName");
            var ltlUpLink        = (Literal)e.Item.FindControl("ltlUpLink");
            var ltlDownLink      = (Literal)e.Item.FindControl("ltlDownLink");
            var ltlCheckBoxHtml  = (Literal)e.Item.FindControl("ltlCheckBoxHtml");

            if (enabled && HasChannelPermissions(nodeId, AppManager.Cms.Permission.Channel.ChannelEdit))
            {
                ltlEditLink.Text = $"<a href=\"{PageChannelEdit.GetRedirectUrl(PublishmentSystemId, nodeId, PageUrl)}\">编辑</a>";

                ltlUpLink.Text =
                    $@"<a href=""{PageUrl}&TheNodeID={nodeInfo.NodeId}&Subtract=True""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>";
                ltlDownLink.Text =
                    $@"<a href=""{PageUrl}&TheNodeID={nodeInfo.NodeId}&Add=True""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>";
            }

            var url = PageUtils.GetCmsUrl(nameof(PageContentChannel), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "NodeID", nodeId.ToString() }
            });

            ltlNodeTitle.Text =
                $@"<a href=""{PageActions.GetRedirectUrl(PublishmentSystemId, nodeId)}"" title=""浏览页面"" target=""_blank""><img src=""{SiteServerAssets.GetIconUrl("tree/folder.gif")}"" border=""0"" align=""absMiddle"" /></a>&nbsp;<A title=""进入栏目"" href=""{url}"">{nodeInfo
                    .NodeName}</A>&nbsp;{NodeManager.GetNodeTreeLastImageHtml(PublishmentSystemInfo, nodeInfo)}&nbsp;<SPAN class=""gray"" style=""FONT-SIZE: 8pt; FONT-FAMILY: arial"">({nodeInfo
                    .ContentNum})</SPAN>";

            ltlNodeIndexName.Text = nodeInfo.NodeIndexName;

            if (enabled)
            {
                ltlCheckBoxHtml.Text = $"<input type='checkbox' name='ChannelIDCollection' value='{nodeInfo.NodeId}' />";
            }
        }
Ejemplo n.º 26
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var inputID   = SqlUtils.EvalInt(e.Item.DataItem, "InputID");
                var inputName = SqlUtils.EvalString(e.Item.DataItem, "InputName");

                var LtlTitle   = (Literal)e.Item.FindControl("LtlTitle");
                var upLink     = (Literal)e.Item.FindControl("UpLink");
                var downLink   = (Literal)e.Item.FindControl("DownLink");
                var styleUrl   = (Literal)e.Item.FindControl("StyleUrl");
                var previewUrl = (Literal)e.Item.FindControl("PreviewUrl");
                var editUrl    = (Literal)e.Item.FindControl("EditUrl");
                var exportUrl  = (Literal)e.Item.FindControl("ExportUrl");

                LtlTitle.Text = $@"<a href=""{PageInputContent.GetRedirectUrl(PublishmentSystemId, inputName)}"">{inputName}</a>";

                var urlUp = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "InputID", inputID.ToString() },
                    { "Up", true.ToString() }
                });
                upLink.Text = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>";

                var urlDown = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "InputID", inputID.ToString() },
                    { "Down", true.ToString() }
                });
                downLink.Text =
                    $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>";

                styleUrl.Text =
                    $@"<a href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId, ETableStyle.InputContent,
                        DataProvider.InputContentDao.TableName, inputID)}"">表单字段</a>";

                previewUrl.Text = $@"<a href=""{PageInputPreview.GetRedirectUrl(PublishmentSystemId, inputID, string.Empty)}"">预览</a>";

                editUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalInputAdd.GetOpenWindowStringToEdit(
                        PublishmentSystemId, inputID, false)}"">编辑</a>";

                exportUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalExportMessage.GetOpenWindowStringToInput(
                        PublishmentSystemId, inputID)}"">导出</a>";
            }
        }
Ejemplo n.º 27
0
 private string GetRedirectUrl(string path)
 {
     //here, limit top path
     if (!DirectoryUtils.IsInDirectory(TopPath, path))
     {
         path = TopPath;
     }
     return(PageUtils.GetCmsUrl(nameof(ModalSelectVideo), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "RootPath", _rootPath },
         { "CurrentRootPath", path },
         { "TextBoxClientID", _textBoxClientId }
     }));
 }
Ejemplo n.º 28
0
 private string GetRedirectUrlWithType(string path, string listTypeStr)
 {
     //here, limit top path
     if (!DirectoryUtils.IsInDirectory(TopPath, path))
     {
         path = TopPath;
     }
     return(PageUtils.GetCmsUrl(nameof(ModalSelectFile), new NameValueCollection
     {
         { "PublishmentSystemID", PublishmentSystemId.ToString() },
         { "RootPath", _rootPath },
         { "CurrentRootPath", path },
         { "ListType", listTypeStr },
         { "HiddenClientID", _hiddenClientId }
     }));
 }
Ejemplo n.º 29
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var typeId   = SqlUtils.EvalInt(e.Item.DataItem, "TypeID");
                var typeName = SqlUtils.EvalString(e.Item.DataItem, "TypeName");

                var ltlTypeName      = e.Item.FindControl("ltlTypeName") as Literal;
                var hlUpLinkButton   = e.Item.FindControl("hlUpLinkButton") as HyperLink;
                var hlDownLinkButton = e.Item.FindControl("hlDownLinkButton") as HyperLink;
                var ltlEditUrl       = e.Item.FindControl("ltlEditUrl") as Literal;
                var ltlDeleteUrl     = e.Item.FindControl("ltlDeleteUrl") as Literal;

                ltlTypeName.Text = typeName;

                hlUpLinkButton.NavigateUrl = PageUtils.GetWcmUrl(nameof(PageGovInteractType), new NameValueCollection
                {
                    { "siteId", PublishmentSystemId.ToString() },
                    { "NodeID", _nodeId.ToString() },
                    { "TypeID", typeId.ToString() },
                    { "Up", true.ToString() }
                });

                hlDownLinkButton.NavigateUrl = PageUtils.GetWcmUrl(nameof(PageGovInteractType), new NameValueCollection
                {
                    { "siteId", PublishmentSystemId.ToString() },
                    { "NodeID", _nodeId.ToString() },
                    { "TypeID", typeId.ToString() },
                    { "Down", true.ToString() }
                });

                ltlEditUrl.Text =
                    $@"<a href='javascript:;' onclick=""{ModalGovInteractTypeAdd.GetOpenWindowStringToEdit(
                        PublishmentSystemId, _nodeId, typeId)}"">编辑</a>";

                var urlDelete = PageUtils.GetWcmUrl(nameof(PageGovInteractType), new NameValueCollection
                {
                    { "siteId", PublishmentSystemId.ToString() },
                    { "NodeID", _nodeId.ToString() },
                    { "TypeID", typeId.ToString() },
                    { "Delete", true.ToString() }
                });
                ltlDeleteUrl.Text =
                    $@"<a href=""{urlDelete}"" onClick=""javascript:return confirm('此操作将删除办件类型“{typeName}”,确认吗?');"">删除</a>";
            }
        }
Ejemplo n.º 30
0
        private string GetDeleteHtml(int taskId, string taskName, int publishmentSystemId)
        {
            if (PublishmentSystemId != 0 && publishmentSystemId != PublishmentSystemId)
            {
                return(string.Empty);
            }

            var urlDelete = PageUtils.GetCmsUrl(nameof(PageTask), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "TaskID", taskId.ToString() },
                { "ServiceType", EServiceTypeUtils.GetValue(_serviceType) },
                { "Delete", true.ToString() }
            });

            return
                ($"<a href=\"{urlDelete}\" onClick=\"javascript:return confirm('此操作将删除{EServiceTypeUtils.GetText(_serviceType)}任务“{taskName}”,确认吗?');\">删除</a>");
        }