示例#1
0
        private void SetNodes(SiteFrontend.CategoryHierarchy.Category cat, ref TreeNode addInNode)
        {
            TreeNode childNode;

            SiteFrontend.CategoryHierarchy.CategoryCollection childrens = cat.GetChildren() as
                                                                          SiteFrontend.CategoryHierarchy.CategoryCollection;
            foreach (SiteFrontend.CategoryHierarchy.Category child in childrens)
            {
                childNode             = new TreeNode(child.Name);
                childNode.NavigateUrl = child.NavigateURL;
                childNode.Value       = child.CategoryId.ToString();
                //debug
                //logger.Debug("# HasChildren - " + child.Name);
                if (child.HasChildren)
                {
                    SetNodes(child, ref childNode);
                }
                if (_curentCategoryID == child.CategoryId)
                {
                    _curentSectionID = child.SectionId;
                    _currentNode     = childNode;
                }
                addInNode.ChildNodes.Add(childNode);
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _categoryID   = ((JKParkLaw.Categories.Category) this.Page).CategoryID;
            _categoryName = ((JKParkLaw.Categories.Category) this.Page).CategoryName;
            _sectionID    = ((JKParkLaw.Categories.Category) this.Page).SectionID;
            _sectionName  = ((JKParkLaw.Categories.Category) this.Page).SectionName;

            collection = SiteFrontend.CategoryHierarchy.Common.GetRootCategories(_sectionID);

            ContentsTable = SiteFrontend.FrontContents.GetContents(_categoryID);

            MakeCategoriesTree();
        }
示例#3
0
        private void SetNodes(SiteFrontend.CategoryHierarchy.Category cat, ref TreeNode addInNode)
        {
            TreeNode childNode;

            SiteFrontend.CategoryHierarchy.CategoryCollection childrens = cat.GetChildren() as
                                                                          SiteFrontend.CategoryHierarchy.CategoryCollection;

            foreach (SiteFrontend.CategoryHierarchy.Category child in childrens)
            {
                childNode             = new TreeNode(child.Name);
                childNode.NavigateUrl = child.NavigateURL;
                childNode.Value       = child.CategoryId.ToString();
                //if (child.HasChildren)
                //{
                //    SetNodes(child, ref childNode);
                //}
                if (_categoryID == child.CategoryId)
                {
                    _currentNode = childNode;
                }
                addInNode.ChildNodes.Add(childNode);
            }
        }