/// <summary> /// ** 功能描述: 构建Document树 /// ** 作 者: Jane Shu /// ** 日 期: 2005-03-18 /// ** 修 改: /// ** 日 期: /// ** nunit /// </summary> /// <returns>根节点,ModuleCode为""</returns> public ITreeObjectNode BuildDocumentTree() { DocDir document = new DocDir(); document.Dirserial = 0; DocumentTreeNode node = new DocumentTreeNode(document); object[] objs = this.GetAllDOCDIROrderBySequence(); node.AddSubTreeObjectNodeRange(this.buildSubDocumentTree(node, objs)); return(node); }
/// <summary> /// ** 功能描述: 构建parent的下一级模块 /// ** 作 者: Jane Shu /// ** 日 期: 2005-03-18 /// ** 修 改: 一次取出所有的Module /// ** 日 期: 2005-04-19 /// </summary> /// <param name="parent"></param> /// <param name="modules"></param> /// <returns></returns> private ITreeObjectNode[] buildSubDocumentTree(DocumentTreeNode parent, object[] documents) { object[] objs = this.GetSubDocumentFromDocumentList(parent.docDir.Dirserial.ToString(), documents); if (objs != null) { ArrayList array = new ArrayList(objs.Length); DocumentTreeNode node = null; foreach (DocDir document in objs) { node = new DocumentTreeNode(document, parent); node.AddSubTreeObjectNodeRange(this.buildSubDocumentTree(node, documents)); array.Add(node); } return((ITreeObjectNode[])array.ToArray(typeof(DocumentTreeNode))); } return(null); }
public DocumentTreeNode(DocDir docDir, DocumentTreeNode parentNode) { this._docDir = docDir; this._parent = parentNode; this._helper = parentNode.TreeObjectNodeHelper; }
public DocumentTreeNode(DocDir docDir) { this._docDir = docDir; this._parent = null; this._helper = new TreeObjectNodeHelper(); }