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

📄 purview.cs

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

    public class Purview : BaseUserControl
    {
        protected ExtendedGridView EgvContents;
        protected ExtendedGridView EgvNodeComments;
        protected ExtendedGridView EgvNodes;
        protected ExtendedGridView EgvSpecial;
        protected Label LblModelPurview;
        private string m_Action;
        public StringBuilder m_ArrModelTr = new StringBuilder();
        public StringBuilder m_ArrSpecialCategoryTr = new StringBuilder();
        public StringBuilder m_ArrSpecialTable = new StringBuilder();
        public StringBuilder m_ArrTable = new StringBuilder();
        public StringBuilder m_ArrTabs = new StringBuilder();
        public StringBuilder m_ArrTitle = new StringBuilder();
        private CheckBox m_ChildNodeManage;
        private bool m_ChildNodeManageAll;
        private string m_ChildNodeManageId;
        private CheckBox m_ChkContentManage;
        private CheckBox m_ChkCurrentNodesManage;
        private CheckBox m_ChkNodeCheck;
        private CheckBox m_ChkNodeCommentCheck;
        private bool m_ChkNodeCommentCheckAll;
        private string m_ChkNodeCommentCheckId;
        private CheckBox m_ChkNodeCommentManage;
        private bool m_ChkNodeCommentManageAll;
        private string m_ChkNodeCommentManageId;
        private CheckBox m_ChkNodeCommentReply;
        private bool m_ChkNodeCommentReplyAll;
        private string m_ChkNodeCommentReplyId;
        private CheckBox m_ChkNodeInput;
        private CheckBox m_ChkNodePreview;
        private bool m_ContentManageAll;
        private string m_ContentManageId;
        private bool m_CurrentNodesManageAll;
        private string m_CurrentNodesManageId;
        private StringBuilder m_fieldNameList = new StringBuilder();
        private bool m_inputSpecialAll;
        private string m_inputSpecialId;
        private StringBuilder m_inputSpecialIds = new StringBuilder();
        private bool m_manageSpecialAll;
        private string m_manageSpecialId;
        private StringBuilder m_manageSpecialIds = new StringBuilder();
        private StringBuilder m_modelIdList = new StringBuilder();
        private bool m_NodeCheckAll;
        private string m_NodeCheckId;
        private bool m_NodeInputAll;
        private string m_NodeInputId;
        private bool m_NodePreviewAll;
        private string m_NodePreviewId;
        private int m_RoleId;
        private StringBuilder m_strMsg = new StringBuilder();
        protected ObjectDataSource OdsEgvContents;
        protected ObjectDataSource OdsEgvNodeComments;
        protected ObjectDataSource OdsEgvNodes;
        protected ObjectDataSource OdsModelList;
        protected ObjectDataSource OdsSpecial;
        protected Repeater RptModelList;
        protected Repeater RptModelList2;
        protected HtmlGenericControl Tabs0;
        protected HtmlGenericControl Tabs1;
        protected HtmlGenericControl Tabs2;
        protected HtmlGenericControl Tabs3;
        protected HtmlGenericControl Tabs4;
        protected HtmlGenericControl Tabs5;
        protected HtmlTableCell TabTitle0;
        protected HtmlTableCell TabTitle1;
        protected HtmlTableCell TabTitle2;
        protected HtmlTableCell TabTitle3;
        protected HtmlTableCell TabTitle4;
        protected HtmlTableCell TabTitle5;
        private XmlDocument xmlDoc;
        private string xmlPath = "menu";

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

        private string Checked(XmlNode child)
        {
            string str = "";
            if (this.GetAttributeValue(child, "IsChoose") == "true")
            {
                str = " Checked ";
            }
            return str;
        }

        private string Description(XmlNode child)
        {
            string attributeValue = "";
            attributeValue = this.GetAttributeValue(child, "Description");
            if (!string.IsNullOrEmpty(attributeValue))
            {
                attributeValue = "<span style='color:green'>" + attributeValue + "</span>";
            }
            return attributeValue;
        }

        protected void EgvContents_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            NodeInfo dataItem = new NodeInfo();
            dataItem = (NodeInfo) e.Row.DataItem;
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                CheckBox box = (CheckBox) e.Row.FindControl("ChkNodePreview");
                CheckBox box2 = (CheckBox) e.Row.FindControl("ChkNodeInput");
                CheckBox box3 = (CheckBox) e.Row.FindControl("ChkNodeCheck");
                CheckBox box4 = (CheckBox) e.Row.FindControl("ChkContentManage");
                Label label = (Label) e.Row.FindControl("LabNodeShowTree");
                label.Text = Nodes.GetTreeLine(dataItem.Depth, dataItem.ParentPath, dataItem.NextId, dataItem.Child) + dataItem.NodeName + Nodes.GetNodeDir(dataItem.Child, dataItem.NodeType, dataItem.NodeDir);
                if (dataItem.NodeId == -1)
                {
                    this.m_NodePreviewId = box.ClientID;
                    this.m_NodeInputId = box2.ClientID;
                    this.m_NodeCheckId = box3.ClientID;
                    this.m_ContentManageId = box4.ClientID;
                    box.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box.ID + "'," + this.m_NodePreviewId + ",'" + this.Tabs1.ClientID + "')");
                    box2.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box2.ID + "'," + this.m_NodeInputId + ",'" + this.Tabs1.ClientID + "')");
                    box3.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box3.ID + "'," + this.m_NodeCheckId + ",'" + this.Tabs1.ClientID + "')");
                    box4.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box4.ID + "'," + this.m_ContentManageId + ",'" + this.Tabs1.ClientID + "')");
                }
                else
                {
                    box.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_NodePreviewId + ")");
                    box2.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_NodeInputId + ")");
                    box3.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_NodeCheckId + ")");
                    box4.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_ContentManageId + ")");
                }
            }
        }

        protected void EgvNodeComments_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            NodeInfo dataItem = new NodeInfo();
            dataItem = (NodeInfo) e.Row.DataItem;
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                CheckBox box = (CheckBox) e.Row.FindControl("ChkNodeCommentReply");
                CheckBox box2 = (CheckBox) e.Row.FindControl("ChkNodeCommentCheck");
                CheckBox box3 = (CheckBox) e.Row.FindControl("ChkNodeCommentManage");
                Label label = (Label) e.Row.FindControl("LabNodeShowTree");
                label.Text = Nodes.GetTreeLine(dataItem.Depth, dataItem.ParentPath, dataItem.NextId, dataItem.Child) + dataItem.NodeName + Nodes.GetNodeDir(dataItem.Child, dataItem.NodeType, dataItem.NodeDir);
                if (dataItem.NodeId == -1)
                {
                    this.m_ChkNodeCommentReplyId = box.ClientID;
                    this.m_ChkNodeCommentCheckId = box2.ClientID;
                    this.m_ChkNodeCommentManageId = box3.ClientID;
                    box.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box.ID + "'," + this.m_ChkNodeCommentReplyId + ",'" + this.Tabs5.ClientID + "')");
                    box2.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box2.ID + "'," + this.m_ChkNodeCommentCheckId + ",'" + this.Tabs5.ClientID + "')");
                    box3.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box3.ID + "'," + this.m_ChkNodeCommentManageId + ",'" + this.Tabs5.ClientID + "')");
                }
                else
                {
                    box.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_ChkNodeCommentReplyId + ")");
                    box2.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_ChkNodeCommentCheckId + ")");
                    box3.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_ChkNodeCommentManageId + ")");
                }
            }
        }

        protected void EgvNodes_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            NodeInfo dataItem = new NodeInfo();
            dataItem = (NodeInfo) e.Row.DataItem;
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                CheckBox box = (CheckBox) e.Row.FindControl("ChkCurrentNodesManage");
                CheckBox box2 = (CheckBox) e.Row.FindControl("ChkChildNodeManage");
                Label label = (Label) e.Row.FindControl("LabNodeShowTree");
                label.Text = Nodes.GetTreeLine(dataItem.Depth, dataItem.ParentPath, dataItem.NextId, dataItem.Child) + dataItem.NodeName + Nodes.GetNodeDir(dataItem.Child, dataItem.NodeType, dataItem.NodeDir);
                if (dataItem.NodeId == -1)
                {
                    this.m_CurrentNodesManageId = box.ClientID;
                    this.m_ChildNodeManageId = box2.ClientID;
                    box.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box.ID + "'," + this.m_CurrentNodesManageId + ",'" + this.Tabs4.ClientID + "')");
                    box2.Attributes.Add("onclick", "ChkNodeAll(this.form,'" + box2.ID + "'," + this.m_ChildNodeManageId + ",'" + this.Tabs4.ClientID + "')");
                }
                else
                {
                    box.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_CurrentNodesManageId + ")");
                    box2.Attributes.Add("onclick", "ChkWipeOffNodeAll(" + this.m_ChildNodeManageId + ")");
                }
            }
        }

        protected void EgvSpecial_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                SpecialTree dataItem = (SpecialTree) e.Row.DataItem;
                Label label = (Label) e.Row.FindControl("LabName");
                CheckBox box = (CheckBox) e.Row.FindControl("ChkSpecialInput");
                CheckBox box2 = (CheckBox) e.Row.FindControl("ChkSpecialManage");
                HiddenField field = (HiddenField) e.Row.FindControl("HdnSpecialId");
                if (dataItem != null)
                {
                    label.Text = Special.TreeLine(dataItem.TreeLineType) + dataItem.Name;
                    if (dataItem.IsSpecialCategory)
                    {
                        field.Value = "0";
                        box.Visible = false;
                        box2.Visible = false;
                    }
                    else
                    {
                        field.Value = dataItem.Id.ToString();
                    }
                    if (!dataItem.IsSpecialCategory)
                    {
                        if (dataItem.Id == -1)
                        {
                            this.m_inputSpecialId = box.ClientID;
                            this.m_manageSpecialId = box2.ClientID;
                            box.Attributes.Add("onclick", "ChkSpecialAll(this.form,'" + box.ID + "'," + this.m_inputSpecialId + ")");
                            box2.Attributes.Add("onclick", "ChkSpecialAll(this.form,'" + box2.ID + "'," + this.m_manageSpecialId + ")");
                        }
                        else

⌨️ 快捷键说明

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