Exemple #1
0
        public IEnumerable <ITreeNode> GetDisplayTreeNodes(string id)
        {
            ITreeNode node = GetTreeNode(id);

            if (node == null)
            {
                return(RootNodes);
            }

            IParamBuilder builder = TreeUtil.GetValueBuilder(fSelector, fDefinition,
                                                             TopLevel, node.Convert <NormalDataRowTreeNode>());

            builder = GetCustomParamBuilder(builder);
            if (builder == null)
            {
                return(Enumerable.Empty <ITreeNode>());
            }
            //IParamBuilder customSql = fTreeProvider.CustomSql;
            //if (builder == null && customSql == null)
            //    return TreeUtil.CreateEmptyEnumerable();
            //if (customSql != null)
            //    builder = builder == null ? customSql : SqlParamBuilder.CreateParamBuilder(builder, customSql);
            var data = TreeUtil.SelectData(fSelector, this, () => fSelector.Select(builder, fOrder), id);

            return(TreeUtil.GetDisplayTreeNodes(data, id));
        }
Exemple #2
0
        public IEnumerable <ITreeNode> GetDisplayTreeNodes(string id)
        {
            int           level   = fProvider.GetLevel(fDefinition, id);
            IParamBuilder builder = TreeUtil.GetLevelBuilder(fSelector, fDefinition,
                                                             level, id, fProvider);

            var data = TreeUtil.SelectData(fSelector, this, () => fSelector.Select(builder), id);

            return(TreeUtil.GetDisplayTreeNodes(data, id));
        }