TreeNode SolutionNode = TreeNode novo (“? ");
TreeNode TableNode = TreeNode novo (“? ");
TreeNode ColumnNode;
foreach (fileira de DataRow em DT.Rows) {
Solution_Name = fileira [0] .ToString ();
Table_Name = fileira [1] .ToString ();
Column_Name = fileira [2] .ToString ();
ColumnNode = TreeNode novo (Column_Name);
se (SolutionNode.Text! = Solution_Name) {
TableNode = TreeNode novo (Table_Name);
SolutionNode = TreeNode novo (Solution_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
treeView1.Nodes.Add (SolutionNode);
} mais se (TableNode.Text! = Table_Name) {
TableNode = TreeNode novo (Table_Name);
TableNode.Nodes.Add (ColumnNode);
SolutionNode.Nodes.Add (TableNode);
} mais se ((== Solution_Name de SolutionNode.Text) && (== Table_Name de TableNode.Text)) {
TableNode.Nodes.Add (ColumnNode);
}
}
|