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

📄 sectioninfo.cs

📁 ASP.NET精品全站程序SQL版.rar
💻 CS
📖 第 1 页 / 共 2 页
字号:
        //
        // Represents the page meta keys. 
        //
        //*********************************************************************
        
        public string PageMetaKeys {
            get { return _pageMetaKeys; }
        }


        //*********************************************************************
        //
        // ViewRoles Property
        //
        // Represents the roles of users who can view pages in this section. 
        //
        //*********************************************************************
                
        public string[] ViewRoles {
            get { return _viewRoles; }
        }


        //*********************************************************************
        //
        // AddRoles Property
        //
        // Represents the roles of users who can add pages to this section. 
        //
        //*********************************************************************
                        
        public string[] AddRoles {
            get { return _addRoles; }
        }


        //*********************************************************************
        //
        // EditRoles Property
        //
        // Represents the roles of users who can edit pages in this section. 
        //
        //*********************************************************************
                        
        public string[] EditRoles {
            get { return _editRoles; }
        }


        //*********************************************************************
        //
        // DeleteRoles Property
        //
        // Represents the roles of users who can delete pages in this section. 
        //
        //*********************************************************************
                        
        public string[] DeleteRoles {
            get { return _deleteRoles; }
        }
      

        //*********************************************************************
        //
        // RecordsPerPage Property
        //
        // Represents the number of content items to display in the
        // section default page. 
        //
        //*********************************************************************
                        
        public int RecordsPerPage {
            get { return _recordsPerPage; }
        }


        //*********************************************************************
        //
        // EnableTopics Property
        //
        // Indicates whether content in this section should be 
        // categorized by topic. 
        //
        //*********************************************************************
                        
        public bool EnableTopics {
            get { return _enableTopics; }
        }


        //*********************************************************************
        //
        // EnableComments Property
        //
        // Indicates whether users should be allowed to add comments to
        // content items in this section. 
        //
        //*********************************************************************
                        
        public bool EnableComments {
            get { return _enableComments; }
        }


        //*********************************************************************
        //
        // CommentRoles Property
        //
        // Represents the roles of users who can comment on pages in this section. 
        //
        //*********************************************************************
                        
        public string[] CommentRoles {
            get { return _commentRoles; }
        }


        //*********************************************************************
        //
        // EnableModeration Property
        //
        // Indicates whether content must be moderated before it is
        // displayed.. 
        //
        //*********************************************************************
                        
        public bool EnableModeration {
            get { return _enableModeration; }
        }


        //*********************************************************************
        //
        // ModerateRoles Property
        //
        // Represents the roles of users who can moderate pages in this section. 
        //
        //*********************************************************************
                        
        public string[] ModerateRoles {
            get { return _moderateRoles; }
        
        }


        //*********************************************************************
        //
        // EnableRatings Property
        //
        // Indicates whether users can rate content in this section. 
        //
        //*********************************************************************
                        
        public bool EnableRatings {
            get { return _enableRatings; }
        }



        //*********************************************************************
        //
        // EnableCommentRatings Property
        //
        // Indicates whether users can rate comments in this section. 
        //
        //*********************************************************************
                        
        public bool EnableCommentRatings {
            get { return _enableCommentRatings; }
        }


        //*********************************************************************
        //
        // RateRoles Property
        //
        // Represents the roles of users who can rate pages in this section. 
        //
        //*********************************************************************
                        
        public string[] RateRoles {
            get { return _rateRoles; }
        }


        //*********************************************************************
        //
        // EnableNotifications Property
        //
        // Indicates whether users can receive email notifications when
        // new content is added to this section. 
        //
        //*********************************************************************
                            
        public bool EnableNotifications {
            get { return _enableNotifications; }
        }    


        //*********************************************************************
        //
        // InheritTransformations Property
        //
        // Indicates whether transformations are inherited from the parent
        // section. 
        //
        //*********************************************************************
                            
        public bool InheritTransformations {
            get { return _inheritTransformations; }
        }
        

        //*********************************************************************
        //
        // Transformations Property
        //
        // Represents the transformations that are applied to text
        // in this section. 
        //
        //*********************************************************************
                        
        public string Transformations {
            get { return _transformations; }
        }


        //*********************************************************************
        //
        // IsSectionWebService Property
        //
        // Indicates whether this section is exposed as a Web service. 
        //
        //*********************************************************************
                        
        public bool IsSectionWebService {
            get { return _isSectionWebService; }
        }
        

        //*********************************************************************
        //
        // WebServicePassword Property
        //
        // Represents the password needed to access this section's Web service. 
        //
        //*********************************************************************
                        
        public string WebServicePassword {
            get { return _webServicePassword; }
        }


        //*********************************************************************
        //
        // AllowHtmlInput Property
        //
        // Represents whether or not users are allowed to add HTML content to forms. 
        //
        //*********************************************************************
                        
        public AllowHtml AllowHtmlInput {
            get { return _allowHtmlInput; }
        }



        //*********************************************************************
        //
        // AllowCommentHtmlInput Property
        //
        // Represents whether or not users are allowed to add HTML content to comments. 
        //
        //*********************************************************************
                        
        public AllowHtml AllowCommentHtmlInput {
            get { return _allowCommentHtmlInput; }
        }
        

        //*********************************************************************
        //
        // Content Property
        //
        // Represents the fully qualified assembly name that 
        // represents the content displayed by this section. 
        //
        //*********************************************************************
                        
        public string Content {
            get { return _content; }
        }

		// SMR - Enh - Begin: Add fail over skin support
		public string FailOverSkin 
		{
			get { return _failOverSkin; }
		}
		// SMR - Enh - End: Add fail over skin support


        //*********************************************************************
        //
        // SectionInfo Constructor
        //
        // Initializes the SectionInfo object with a DataRow. 
        //
        //*********************************************************************
                
        public SectionInfo(DataRow drowSection, DataRow[] drowSectionSecurity, DataRow[] drowWebBoxes, DataRow[] drowWebServiceBoxes) {
            _id = (int)drowSection[ "section_id" ];
            _communityID = (int)drowSection[ "section_communityID" ];
            _name = (string)drowSection[ "section_name" ];
            _title = (string)drowSection[ "section_title" ];
            _menuTitle = (string)drowSection[ "section_menuTitle" ];
            _description = (string)drowSection[ "section_description" ];
            _isEnabled = (bool)drowSection["section_isEnabled"];
            _isSystem = (bool)drowSection["section_isSystem"];
            _pageType = (int)drowSection[ "section_pageType" ];
            _skin = (string)drowSection[ "section_pageSkin" ];
            _style = (string)drowSection[ "section_pageStyle" ];
            _parentSectionID = (int)drowSection[ "section_parentID" ];
            _isWebBoxesInherited = (bool)drowSection[ "section_isWebBoxesInherited" ];
            _webBoxes = SplitBoxes(drowWebBoxes);
            _webBoxDisplayMode = (int)drowSection[ "section_webBoxDisplayMode" ];
            _isWebServiceBoxesInherited = (bool)drowSection["section_isWebServiceBoxesInherited"];
            _webServiceBoxes = SplitServiceBoxes(drowWebServiceBoxes);
            _webServiceBoxDisplayMode = (int)drowSection["section_webServiceBoxDisplayMode"];
            _logo = (string)drowSection[ "section_logo" ];
            _pageHeader = (string)drowSection[ "section_pageHeader" ];
            _pageFooter = (string)drowSection[ "section_pageFooter" ];    
            _footer = (string)drowSection[ "section_footer" ];
            _pageMetaKeys = (string)drowSection[ "section_pageMetaKeys" ];
            _pageMetaDesc = (string)drowSection[ "section_pageMetaDesc" ];
            _viewRoles = SplitRoles(drowSectionSecurity, RoleType.ViewRole);
            _addRoles = SplitRoles(drowSectionSecurity, RoleType.AddRole);;
            _editRoles = SplitRoles(drowSectionSecurity, RoleType.EditRole);;
            _deleteRoles = SplitRoles(drowSectionSecurity, RoleType.DeleteRole);
            _recordsPerPage = ((int)drowSection[ "section_recordsPerPage" ]);
            _enableTopics = (bool)drowSection[ "section_enableTopics" ];
            _enableComments = (bool)drowSection[ "section_enableComments" ];
            _commentRoles = SplitRoles(drowSectionSecurity, RoleType.CommentRole);
            _enableModeration = (bool)drowSection[ "section_enableModeration" ];
            _moderateRoles = SplitRoles(drowSectionSecurity, RoleType.ModerateRole);
            _enableRatings = (bool)drowSection[ "section_enableRatings" ];
            _enableCommentRatings = (bool)drowSection[ "section_enableCommentRatings" ];
            _rateRoles = SplitRoles(drowSectionSecurity, RoleType.RateRole);
            _enableNotifications = (bool)drowSection["section_enableNotifications"];
            _inheritTransformations = (bool)drowSection[ "section_inheritTransformations" ];
            _transformations = (string)drowSection[ "section_transformations" ];
            _isSectionWebService = (bool)drowSection[ "section_isSectionWebService" ];
            _webServicePassword = (string)drowSection[ "section_webServicePassword" ];
            _allowHtmlInput = (AllowHtml)drowSection["section_allowHtmlInput"];
            _allowCommentHtmlInput = (AllowHtml)drowSection["section_allowCommentHtmlInput"];
            _content = (string)drowSection[ "pageType_pageContent" ];
            _path = (string)drowSection["section_path"];
			// SMR - Enh - Begin: Add fail over skin support
			_failOverSkin = (string)drowSection[ "section_failOverPageSkin" ];
			// SMR - Enh - End: Add fail over skin support
        }
      
		public SectionInfo(){}

        
      private string[] SplitRoles(DataRow[] allRoles, RoleType sectionRoleType) {
            ArrayList colRoles = new ArrayList();
            
            
            foreach (DataRow row in allRoles)
                if ((RoleType)row["ss_roleType"] == sectionRoleType)
                    colRoles.Add( row["ss_role"] );
                  
            return (string[])colRoles.ToArray(typeof(String));
      }  
      
      private string[] SplitBoxes(DataRow[] allBoxes) {
            ArrayList colBoxes = new ArrayList();
            
            foreach (DataRow row in allBoxes)
                colBoxes.Add( row["sw_webBox"] );
                
            return (string[])colBoxes.ToArray(typeof(String));
      }


      
      private string[] SplitServiceBoxes(DataRow[] allBoxes) {
            ArrayList colBoxes = new ArrayList();
            
            foreach (DataRow row in allBoxes)
                colBoxes.Add( row["sw_webServiceBox"] );
                
            return (string[])colBoxes.ToArray(typeof(String));
      }


        
    }
}

⌨️ 快捷键说明

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