Exemple #1
0
        public static Tree Build(_Nodes node, int rows = 4)
        {
            var root = new Tree(node);

            if (rows == 0)
            {
                return(root);
            }
            var children = Database.SelectChildren(node.ID, null).Select(item => item.Child);

            foreach (var child in children)
            {
                var item = Build(child, rows - 1);
                item.Parent = root;
                root.Children.Add(item);
            }
            return(root);
        }
Exemple #2
0
 public Tree(_Nodes node)
 {
     Current = node;
 }