TreeNode SolutionNode = nya TreeNode (”? ”);
TreeNode TableNode = nya TreeNode (”? ”);
TreeNode ColumnNode;
foreach (DataRow ror i DT.Rows) {
Solution_Name = ror [0] .ToString ();
Table_Name = ror [1] .ToString ();
Column_Name = ror [2] .ToString ();
ColumnNode = nya TreeNode (Column_Name);
om (SolutionNode.Text! = Solution_Name) {
TableNode = nya TreeNode (Table_Name);
SolutionNode = nya TreeNode (Solution_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
treeView1.Nodes.Add (SolutionNode);
} annars om (TableNode.Text! = Table_Name) {
TableNode = nya TreeNode (Table_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
} annars, om ((SolutionNode.Text-== Solution_Name) && (TableNode.Text-== Table_Name)) {
TableNode.Nodes.Add (ColumnNode);
}
}
|