⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 category.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 4 页
字号:
namespace PowerEasy.WebSite.Admin.Contents
{
    using PowerEasy.AccessManage;
    using PowerEasy.Common;
    using PowerEasy.CommonModel;
    using PowerEasy.Components;
    using PowerEasy.Contents;
    using PowerEasy.Controls;
    using PowerEasy.Enumerations;
    using PowerEasy.ExtendedControls;
    using PowerEasy.Model.AccessManage;
    using PowerEasy.Model.CommonModel;
    using PowerEasy.Model.Contents;
    using PowerEasy.Model.UserManage;
    using PowerEasy.ModelControls;
    using PowerEasy.Templates;
    using PowerEasy.UserManage;
    using PowerEasy.Web.UI;
    using PowerEasy.WebSite.Controls;
    using PowerEasy.WorkFlows;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Text;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class Category : AdminPage
    {
        protected CheckBox ChkCommentNeedCheck;
        protected CheckBox ChkEnableComment;
        protected CheckBox ChkEnableTouristsComment;
        protected ComboBox CombItemPageSize;
        protected TextBox Custom_Content1;
        protected TextBox Custom_Content10;
        protected TextBox Custom_Content11;
        protected TextBox Custom_Content12;
        protected TextBox Custom_Content13;
        protected TextBox Custom_Content14;
        protected TextBox Custom_Content15;
        protected TextBox Custom_Content16;
        protected TextBox Custom_Content17;
        protected TextBox Custom_Content18;
        protected TextBox Custom_Content19;
        protected TextBox Custom_Content2;
        protected TextBox Custom_Content20;
        protected TextBox Custom_Content3;
        protected TextBox Custom_Content4;
        protected TextBox Custom_Content5;
        protected TextBox Custom_Content6;
        protected TextBox Custom_Content7;
        protected TextBox Custom_Content8;
        protected TextBox Custom_Content9;
        protected DropDownList DropCustomNum;
        protected DropDownList DropParentNode;
        protected DropDownList DropWorkFlow;
        protected DropDownList DrpItemListOrderType;
        protected DropDownList DrpItemOpenType;
        protected ExtendedButton EBtnAdd;
        protected Button EbtnDelete;
        protected ExtendedButton EBtnModify;
        protected ExtendedGridView EgvPermissions;
        protected ExtendedGridView EgvRoleView;
        protected TemplateSelectControl FileCdefaultListTmeplate;
        protected TemplateSelectControl FileContainChildTemplate;
        protected HiddenField HdnNodeId;
        protected DataTable initDataTable;
        protected Label LblNodeName;
        protected Label LblNodePermissions;
        protected ListBox LstRelationNodes;
        protected ListBox LstRelationSpecial;
        protected string m_arrCurrentNodesManage;
        protected HtmlTableRow objFiles1;
        protected HtmlTableRow objFiles10;
        protected HtmlTableRow objFiles11;
        protected HtmlTableRow objFiles12;
        protected HtmlTableRow objFiles13;
        protected HtmlTableRow objFiles14;
        protected HtmlTableRow objFiles15;
        protected HtmlTableRow objFiles16;
        protected HtmlTableRow objFiles17;
        protected HtmlTableRow objFiles18;
        protected HtmlTableRow objFiles19;
        protected HtmlTableRow objFiles2;
        protected HtmlTableRow objFiles20;
        protected HtmlTableRow objFiles3;
        protected HtmlTableRow objFiles4;
        protected HtmlTableRow objFiles5;
        protected HtmlTableRow objFiles6;
        protected HtmlTableRow objFiles7;
        protected HtmlTableRow objFiles8;
        protected HtmlTableRow objFiles9;
        protected ComboBox PagePostfix;
        protected Panel PnlCustomFileds;
        protected RadioButtonList RadlAutoCreateHtmlType;
        protected RadioButtonList RadlEnableAddWhenHasChild;
        protected RadioButtonList RadlEnableProtect;
        protected RadioButtonList RadlIsContentPageCreate;
        protected RadioButtonList RadlIsListPageCreate;
        protected RadioButtonList RadlListPageHtmlDirType;
        protected RadioButtonList RadlShowOnListIndex;
        protected RadioButtonList RadlShowOnListParent;
        protected RadioButtonList RadlShowOnMap;
        protected RadioButtonList RadlShowOnMenu;
        protected RadioButtonList RadlShowOnPath;
        protected RadioButton RadNeedCache0;
        protected RadioButton RadNeedCache1;
        protected RadioButton RadOpenType0;
        protected RadioButton RadOpenType1;
        protected RadioButton RadPurviewType0;
        protected RadioButton RadPurviewType1;
        protected RadioButton RadPurviewType2;
        protected RegularExpressionValidator RegTxtNodeDir;
        protected Repeater RepContentModelTemplate;
        protected Repeater RepShopModelTemplate;
        protected PowerEasy.Controls.RequiredFieldValidator RequiredFieldValidator1;
        protected HtmlTableRow SelectRelation;
        protected ChargeTypeSetting ShowChargeType;
        protected PowerEasy.ModelControls.ShowPointName ShowPointName;
        protected PowerEasy.ModelControls.ShowPointName ShowPointName1;
        protected PowerEasy.ModelControls.ShowPointName ShowPointName2;
        protected ScriptManager SmCategory;
        protected ExtendedSiteMapPath SmpNavigator;
        protected HtmlTableCell TabTitle3;
        protected HtmlTableCell TabTitle6;
        protected HtmlTableCell TdGroupPermissions;
        protected HtmlTableCell TdRolePermissions;
        protected TextBox TxtCacheTime;
        protected ComboBox TxtContentHtmlDir;
        protected ComboBox TxtContentHtmlExt;
        protected ComboBox TxtContentHtmlFile;
        protected TextBox TxtDefaultItemDividePercent;
        protected TextBox TxtDefaultItemPoint;
        protected TextBox TxtDescription;
        protected TextBox TxtHitsOfHot;
        protected TextBox TxtMetaDescription;
        protected TextBox TxtMetaKeywords;
        protected TextBox TxtNodeDir;
        protected TextBox TxtNodeIdentifier;
        protected TextBox TxtNodeName;
        protected TextBox TxtNodePicUrl;
        protected TextBox TxtPresentExp;
        protected TextBox TxtTips;
        protected System.Web.UI.UpdatePanel UpdatePanel1;
        protected System.Web.UI.UpdatePanel UpPermissions;
        protected System.Web.UI.UpdatePanel UpPurviewType;
        protected RangeValidator ValgCacheTime;
        protected RangeValidator ValgDefaultItemPoint;
        protected RangeValidator ValgHitsOfHot;
        protected RangeValidator ValgPresentExp;
        protected PowerEasy.Controls.RequiredFieldValidator Valr;
        protected PowerEasy.Controls.RequiredFieldValidator ValrNodeIdentifierTab0;
        protected PowerEasy.Controls.RequiredFieldValidator ValrNodeNameTab0;
        protected ValidationSummary ValSum;

        private void AddPermissions(string roleIdList, OperateCode operateCode, int nodeId, string errorMessage)
        {
            if (!UserPermissions.AddNodePermissions(roleIdList, operateCode, nodeId, 1))
            {
                AdminPage.WriteErrMsg("<li>" + errorMessage + "</li>");
            }
        }

        private static void AppendSelectId(bool isChecked, StringBuilder roleIdList, string selectId)
        {
            if (isChecked)
            {
                StringHelper.AppendString(roleIdList, selectId);
            }
        }

        private void BindNodesInfo(int nodeId)
        {
            NodeInfo cacheNodeById = PowerEasy.Contents.Nodes.GetCacheNodeById(nodeId);
            if (cacheNodeById.IsNull)
            {
                AdminPage.WriteErrMsg("发生错误,请传入正确的NodeID!");
            }
            if (cacheNodeById.Settings == null)
            {
                AdminPage.WriteErrMsg("发生错误!");
            }
            this.SmpNavigator.CurrentNode = "修改栏目设置:<span style=\"color: Red\">" + cacheNodeById.NodeName + "</span>";
            this.DropParentNode.SelectedValue = cacheNodeById.ParentId.ToString();
            this.DropParentNode.Visible = false;
            this.LblNodeName.Text = PowerEasy.Contents.Nodes.ShowParentNodesNavigation(nodeId);
            this.TxtNodeName.Text = DataSecurity.HtmlDecode(cacheNodeById.NodeName);
            this.TxtNodeIdentifier.Text = DataSecurity.HtmlDecode(cacheNodeById.NodeIdentifier);
            this.TxtNodeDir.Enabled = false;
            this.TxtNodeDir.Text = cacheNodeById.NodeDir;
            this.TxtNodePicUrl.Text = cacheNodeById.NodePicUrl;
            this.TxtTips.Text = cacheNodeById.Tips;
            this.TxtDescription.Text = cacheNodeById.Description;
            this.TxtMetaDescription.Text = cacheNodeById.MetaDescription;
            this.TxtMetaKeywords.Text = cacheNodeById.MetaKeywords;
            switch (cacheNodeById.OpenType)
            {
                case 0:
                    this.RadOpenType0.Checked = true;
                    break;

                case 1:
                    this.RadOpenType1.Checked = true;
                    break;
            }
            this.SetPurviewType(cacheNodeById.ParentId, cacheNodeById.PurviewType);
            this.ChkEnableComment.Checked = cacheNodeById.Settings.EnableComment;
            this.ChkEnableTouristsComment.Checked = cacheNodeById.Settings.EnableTouristsComment;
            this.ChkCommentNeedCheck.Checked = cacheNodeById.Settings.CommentNeedCheck;
            this.DropWorkFlow.SelectedValue = cacheNodeById.WorkFlowId.ToString();
            this.RadlEnableProtect.SelectedValue = cacheNodeById.Settings.EnableProtect.ToString();
            this.RadlEnableAddWhenHasChild.SelectedValue = cacheNodeById.Settings.EnableAddWhenHasChild.ToString();
            this.TxtHitsOfHot.Text = cacheNodeById.HitsOfHot.ToString();
            if (cacheNodeById.Settings.IsSetCache)
            {
                this.RadNeedCache1.Checked = true;
                this.RadNeedCache0.Checked = false;
                this.TxtCacheTime.Text = cacheNodeById.Settings.CacheTime.ToString();
            }
            else
            {
                this.RadNeedCache1.Checked = false;
                this.RadNeedCache0.Checked = true;
            }
            this.TxtPresentExp.Text = cacheNodeById.Settings.PresentExp.ToString();
            this.TxtDefaultItemPoint.Text = cacheNodeById.Settings.DefaultItemPoint.ToString();
            this.ShowChargeType.ChargeType = cacheNodeById.Settings.DefaultItemChargeType;
            this.ShowChargeType.PitchTime = cacheNodeById.Settings.DefaultItemPitchTime;
            this.ShowChargeType.ReadTimes = cacheNodeById.Settings.DefaultItemReadTimes;
            this.TxtDefaultItemDividePercent.Text = cacheNodeById.Settings.DefaultItemDividePercent.ToString();
            this.RadlShowOnMenu.SelectedValue = cacheNodeById.ShowOnMenu.ToString();
            this.RadlShowOnPath.SelectedValue = cacheNodeById.ShowOnPath.ToString();
            this.RadlShowOnMap.SelectedValue = cacheNodeById.ShowOnMap.ToString();
            this.RadlShowOnListIndex.SelectedValue = cacheNodeById.ShowOnListIndex.ToString();
            this.RadlShowOnListParent.SelectedValue = cacheNodeById.ShowOnListParent.ToString();
            BasePage.SetSelectedIndexByValue(this.DrpItemListOrderType, cacheNodeById.ItemListOrderType.ToString());
            BasePage.SetSelectedIndexByValue(this.DrpItemOpenType, cacheNodeById.ItemOpenType.ToString());
            this.CombItemPageSize.Value = cacheNodeById.ItemPageSize.ToString();
            this.FileCdefaultListTmeplate.Text = cacheNodeById.DefaultTemplateFile;
            this.FileContainChildTemplate.Text = cacheNodeById.ContainChildTemplateFile;
            this.RadlIsContentPageCreate.SelectedIndex = this.RadlIsContentPageCreate.Items.IndexOf(this.RadlIsContentPageCreate.Items.FindByValue(cacheNodeById.IsCreateContentPage.ToString().ToLower()));
            this.RadlIsListPageCreate.SelectedIndex = this.RadlIsListPageCreate.Items.IndexOf(this.RadlIsListPageCreate.Items.FindByValue(cacheNodeById.IsCreateListPage.ToString().ToLower()));
            BasePage.SetSelectedIndexByValue(this.RadlAutoCreateHtmlType, cacheNodeById.AutoCreateHtmlType.ToString());
            if (cacheNodeById.AutoCreateHtmlType == AutoCreateHtmlType.ContentAndRelatedNode)
            {
                this.SelectRelation.Attributes.Add("style", "display:");
            }
            this.ListBoxSetValue(this.LstRelationNodes, cacheNodeById.RelateNode);
            this.ListBoxSetValue(this.LstRelationSpecial, cacheNodeById.RelateSpecial);
            BasePage.SetSelectedIndexByValue(this.RadlListPageHtmlDirType, cacheNodeById.ListPageSavePathType.ToString());
            this.PagePostfix.Value = cacheNodeById.ListPagePostfix;
            if (!string.IsNullOrEmpty(cacheNodeById.ContentPageHtmlRule))
            {
                string contentPageHtmlRule = cacheNodeById.ContentPageHtmlRule;
                this.TxtContentHtmlDir.Value = contentPageHtmlRule.Substring(0, contentPageHtmlRule.LastIndexOf("/"));
                string str2 = contentPageHtmlRule.Substring(contentPageHtmlRule.LastIndexOf("/") + 1, (contentPageHtmlRule.Length - contentPageHtmlRule.LastIndexOf("/")) - 1);
                int startIndex = contentPageHtmlRule.LastIndexOf(".");
                if (startIndex > 0)
                {
                    this.TxtContentHtmlExt.Value = contentPageHtmlRule.Substring(startIndex, contentPageHtmlRule.Length - contentPageHtmlRule.LastIndexOf(".")).Replace(".", "");
                    this.TxtContentHtmlFile.Value = str2.Substring(0, str2.LastIndexOf("."));
                }
            }
            int num2 = 1;
            if (!string.IsNullOrEmpty(cacheNodeById.CustomContent))
            {
                string[] strArray = cacheNodeById.CustomContent.Split(new string[] { "{#$$$#}" }, StringSplitOptions.None);
                int num3 = 1;
                foreach (string str3 in strArray)
                {
                    num2 = num3;
                    ((TextBox) this.PnlCustomFileds.FindControl("Custom_Content" + num3)).Text = str3;
                    ((HtmlTableRow) this.PnlCustomFileds.FindControl("objFiles" + num3)).Attributes.Add("style", "display: ''");
                    num3++;
                }
            }
            ((DropDownList) this.PnlCustomFileds.FindControl("DropCustomNum")).SelectedValue = num2.ToString();
        }

        private static string CountRoleNodePermissionsId(string iChildNodesManage)
        {
            NodeInfo nodeById = PowerEasy.Contents.Nodes.GetNodeById(DataConverter.CLng(iChildNodesManage));
            if (nodeById.IsNull)
            {
                return "";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -