¿TreeNode SolutionNode = nuevo TreeNode (“? ");
¿TreeNode TableNode = nuevo TreeNode (“? ");
TreeNode ColumnNode;
foreach (fila de DataRow en DT.Rows) {
Solution_Name = fila [0] .ToString ();
Table_Name = fila [1] .ToString ();
Column_Name = fila [2] .ToString ();
ColumnNode = nuevo TreeNode (Column_Name);
¡si (SolutionNode.Text! = Solution_Name) {
TableNode = nuevo TreeNode (Table_Name);
SolutionNode = nuevo TreeNode (Solution_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
treeView1.Nodes.Add (SolutionNode);
¡} si (TableNode.Text! = Table_Name) {
TableNode = nuevo TreeNode (Table_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
} si ((== Solution_Name de SolutionNode.Text) && (== Table_Name de TableNode.Text)) {
TableNode.Nodes.Add (ColumnNode);
}
}
|