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

📄 purview.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 4 页
字号:
                        {
                            box.Checked = true;
                        }
                    }
                    if (((field2.Value == "Title") || (field2.Value == "Status")) || (field2.Value == "NodeId"))
                    {
                        box.Enabled = false;
                    }
                }
                HtmlTable table = (HtmlTable) e.Item.FindControl("model");
                if (e.Item.ItemIndex > 0)
                {
                    table.Style.Add("display", "none");
                }
                if (this.m_ArrTable.Length == 0)
                {
                    this.m_ArrTable.Append("\"" + table.ClientID + "\"");
                }
                else
                {
                    this.m_ArrTable.Append(",\"" + table.ClientID + "\"");
                }
            }
        }

        public bool SetAttributesValue(string nodeName, string key, string val)
        {
            XmlNode node = this.xmlDoc.SelectSingleNode(nodeName);
            if (node == null)
            {
                return false;
            }
            ((XmlElement) node).SetAttribute(key, val);
            return true;
        }

        private void SetContentNode(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            for (int i = 0; i < this.EgvContents.Rows.Count; i++)
            {
                this.m_ChkNodePreview = (CheckBox) this.EgvContents.Rows[i].Cells[2].FindControl("ChkNodePreview");
                this.m_ChkNodeInput = (CheckBox) this.EgvContents.Rows[i].Cells[3].FindControl("ChkNodeInput");
                this.m_ChkNodeCheck = (CheckBox) this.EgvContents.Rows[i].Cells[4].FindControl("ChkNodeCheck");
                this.m_ChkContentManage = (CheckBox) this.EgvContents.Rows[i].Cells[5].FindControl("ChkContentManage");
                int num2 = DataConverter.CLng(this.EgvContents.Rows[i].Cells[0].Text);
                for (int j = 0; j < roleNodePermissionsList.Count; j++)
                {
                    if (roleNodePermissionsList[j].NodeId == num2)
                    {
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeContentPreview) && !this.m_NodePreviewAll)
                        {
                            this.m_ChkNodePreview.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeContentInput) && !this.m_NodeInputAll)
                        {
                            this.m_ChkNodeInput.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeContentCheck) && !this.m_NodeCheckAll)
                        {
                            this.m_ChkNodeCheck.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeContentManage) && !this.m_ContentManageAll)
                        {
                            this.m_ChkContentManage.Checked = true;
                        }
                    }
                }
            }
        }

        private void SetContentNodeAll(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            CheckBox box = (CheckBox) this.EgvContents.Rows[0].Cells[2].FindControl("ChkNodePreview");
            CheckBox box2 = (CheckBox) this.EgvContents.Rows[0].Cells[3].FindControl("ChkNodeInput");
            CheckBox box3 = (CheckBox) this.EgvContents.Rows[0].Cells[4].FindControl("ChkNodeCheck");
            CheckBox box4 = (CheckBox) this.EgvContents.Rows[0].Cells[5].FindControl("ChkContentManage");
            for (int i = 0; i < roleNodePermissionsList.Count; i++)
            {
                if (roleNodePermissionsList[i].NodeId == -1)
                {
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeContentPreview)
                    {
                        box.Checked = true;
                        this.m_NodePreviewAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeContentInput)
                    {
                        box2.Checked = true;
                        this.m_NodeInputAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeContentCheck)
                    {
                        box3.Checked = true;
                        this.m_NodeCheckAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeContentManage)
                    {
                        box4.Checked = true;
                        this.m_ContentManageAll = true;
                    }
                }
            }
        }

        private void SetNode(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            for (int i = 0; i < this.EgvNodes.Rows.Count; i++)
            {
                this.m_ChkCurrentNodesManage = (CheckBox) this.EgvNodes.Rows[i].Cells[2].FindControl("ChkCurrentNodesManage");
                this.m_ChildNodeManage = (CheckBox) this.EgvNodes.Rows[i].Cells[3].FindControl("ChkChildNodeManage");
                int num2 = DataConverter.CLng(this.EgvNodes.Rows[i].Cells[0].Text);
                for (int j = 0; j < roleNodePermissionsList.Count; j++)
                {
                    if (roleNodePermissionsList[j].NodeId == num2)
                    {
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.CurrentNodesManage) && !this.m_CurrentNodesManageAll)
                        {
                            this.m_ChkCurrentNodesManage.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.ChildNodesManage) && !this.m_ChildNodeManageAll)
                        {
                            this.m_ChildNodeManage.Checked = true;
                        }
                    }
                }
            }
        }

        private void SetNodeAll(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            CheckBox box = (CheckBox) this.EgvNodes.Rows[0].Cells[2].FindControl("ChkCurrentNodesManage");
            CheckBox box2 = (CheckBox) this.EgvNodes.Rows[0].Cells[3].FindControl("ChkChildNodeManage");
            for (int i = 0; i < roleNodePermissionsList.Count; i++)
            {
                if (roleNodePermissionsList[i].NodeId == -1)
                {
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.CurrentNodesManage)
                    {
                        box.Checked = true;
                        this.m_CurrentNodesManageAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.ChildNodesManage)
                    {
                        box2.Checked = true;
                        this.m_ChildNodeManageAll = true;
                    }
                }
            }
        }

        private void SetNodeComment(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            for (int i = 0; i < this.EgvNodeComments.Rows.Count; i++)
            {
                this.m_ChkNodeCommentReply = (CheckBox) this.EgvNodeComments.Rows[i].Cells[2].FindControl("ChkNodeCommentReply");
                this.m_ChkNodeCommentCheck = (CheckBox) this.EgvNodeComments.Rows[i].Cells[3].FindControl("ChkNodeCommentCheck");
                this.m_ChkNodeCommentManage = (CheckBox) this.EgvNodeComments.Rows[i].Cells[4].FindControl("ChkNodeCommentManage");
                int num2 = DataConverter.CLng(this.EgvNodeComments.Rows[i].Cells[0].Text);
                for (int j = 0; j < roleNodePermissionsList.Count; j++)
                {
                    if (roleNodePermissionsList[j].NodeId == num2)
                    {
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeCommentReply) && !this.m_ChkNodeCommentReplyAll)
                        {
                            this.m_ChkNodeCommentReply.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeCommentCheck) && !this.m_ChkNodeCommentCheckAll)
                        {
                            this.m_ChkNodeCommentCheck.Checked = true;
                        }
                        if ((roleNodePermissionsList[j].OperateCode == OperateCode.NodeCommentManage) && !this.m_ChkNodeCommentManageAll)
                        {
                            this.m_ChkNodeCommentManage.Checked = true;
                        }
                    }
                }
            }
        }

        private void SetNodeCommentAll(IList<RoleNodePermissionsInfo> roleNodePermissionsList)
        {
            CheckBox box = (CheckBox) this.EgvNodeComments.Rows[0].Cells[2].FindControl("ChkNodeCommentReply");
            CheckBox box2 = (CheckBox) this.EgvNodeComments.Rows[0].Cells[3].FindControl("ChkNodeCommentCheck");
            CheckBox box3 = (CheckBox) this.EgvNodeComments.Rows[0].Cells[4].FindControl("ChkNodeCommentManage");
            for (int i = 0; i < roleNodePermissionsList.Count; i++)
            {
                if (roleNodePermissionsList[i].NodeId == -1)
                {
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeCommentReply)
                    {
                        box.Checked = true;
                        this.m_ChkNodeCommentReplyAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeCommentCheck)
                    {
                        box2.Checked = true;
                        this.m_ChkNodeCommentCheckAll = true;
                    }
                    if (roleNodePermissionsList[i].OperateCode == OperateCode.NodeCommentManage)
                    {
                        box3.Checked = true;
                        this.m_ChkNodeCommentManageAll = true;
                    }
                }
            }
        }

        public string Action
        {
            get
            {
                return this.m_Action;
            }
            set
            {
                this.m_Action = value;
            }
        }

        public int RoleId
        {
            get
            {
                return this.m_RoleId;
            }
            set
            {
                this.m_RoleId = value;
            }
        }

        public string StrMsg
        {
            get
            {
                return this.m_strMsg.ToString();
            }
        }
    }
}

⌨️ 快捷键说明

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