TreeNode SolutionNode = nieuwe TreeNode („? “);
TreeNode TableNode = nieuwe TreeNode („? “);
TreeNode ColumnNode;
foreach (rij DataRow in DT.Rows) {
Solution_Name = rij [0] .ToString ();
Table_Name = rij [1] .ToString ();
Column_Name = rij [2] .ToString ();
ColumnNode = nieuwe TreeNode (Column_Name);
als (SolutionNode.Text! = Solution_Name) {
TableNode = nieuwe TreeNode (Table_Name);
SolutionNode = nieuwe TreeNode (Solution_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
treeView1.Nodes.Add (SolutionNode);
} anders als (TableNode.Text! = Table_Name) {
TableNode = nieuwe TreeNode (Table_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
} anders als ((SolutionNode.Text == Solution_Name) && (TableNode.Text == Table_Name)) {
TableNode.Nodes.Add (ColumnNode);
}
}
|