/// <summary> /// 构建Document树 /// </summary> /// <param name="reload">是否重新从数据库中读取Document树</param> private void BuildDocumentTree(bool reload) { this.treeDocument.Nodes.Clear(); if (reload) { this.LoadDocumentTreeToApplication(); } ITreeObjectNode node = LoadDocumentTreeToApplication(); this.treeDocument.Nodes.Add(BuildTreeNode(node)); LanguageWord lword = this.languageComponent1.GetLanguage("documentRoot"); if (lword != null) { this.treeDocument.Nodes[0].Text = lword.ControlText; } //this.treeModule.ExpandAll(); this.treeDocument.CollapseAll(); if (this.treeDocument.SelectedNode != null) { Infragistics.WebUI.UltraWebNavigator.Node nodeParent = this.treeDocument.SelectedNode.Parent; while (nodeParent != null) { nodeParent.Expand(false); nodeParent = nodeParent.Parent; } } this.BuildParentDocumentCodeList(); }
/// <summary> /// 构建Menu树 /// </summary> private void BuildMenuTree() { this.treeMenu.Nodes.Clear(); ITreeObjectNode node = this.LoadMenuTree(); this.treeMenu.Nodes.Add(BuildTreeNode(node)); LanguageWord lword = this.languageComponent1.GetLanguage("menuRoot"); if (lword != null) { this.treeMenu.Nodes[0].Text = lword.ControlText; } //this.treeMenu.ExpandAll(); this.treeMenu.CollapseAll(); if (this.treeMenu.SelectedNode != null) { Infragistics.WebUI.UltraWebNavigator.Node nodeParent = this.treeMenu.SelectedNode.Parent; while (nodeParent != null) { nodeParent.Expand(false); nodeParent = nodeParent.Parent; } } this.BuildParenMenuCodeList(); }