예제 #1
0
        private static Node_Tree CreateChildTree(ChildTree child)
        {
            Node_Tree nodeChild = CrateNodeTree(child.Title, child.Id.ToString(), child.Tag);

            foreach (var item in child.Children)
            {
                nodeChild.nodes = nodeChild.nodes ?? new Collection <Node_Tree>();
                nodeChild.nodes.Add(CreateGrandChildTree(item));
            }

            return(nodeChild);
        }
예제 #2
0
        private static Node_Tree CreateParentTree(ParentTree parent)
        {
            Node_Tree nodeParent = CrateNodeTree(parent.Title, parent.Id.ToString(), parent.Tag);

            foreach (var item in parent.Children)
            {
                nodeParent.nodes = nodeParent.nodes ?? new Collection <Node_Tree>();
                nodeParent.nodes.Add(CreateChildTree(item));
            }

            return(nodeParent);
        }
예제 #3
0
        private static Node_Tree CreateGrandChildTree(GrandChildTree grandChild)
        {
            Node_Tree nodeGrandChild = CrateNodeTree(grandChild.Title, grandChild.Id.ToString(), grandChild.Tag);

            return(nodeGrandChild);
        }