CODE Stückchen
int I = 0;
foreach (DataRow Reihe in DT.Rows)
{
Solution_Name = DT.Rows [i] [0] .ToString ();
Table_Name = DT.Rows [i] [1] .ToString ();
Column_Name = DT.Rows [i] [3] .ToString ();
TreeNode SolutionNode = neues TreeNode (Solution_Name);
TreeNode ColumnNode = neues TreeNode (Column_Name);
TreeNode TableNode = neues TreeNode (Table_Name);
wenn (Previous_Solution_Name! = Solution_Name)
{
treeView1.Nodes.Add (SolutionNode);
SolutionNode.Nodes.Add (TableNode);
TableNode.Nodes.Add (ColumnNode);
Previous_Solution_Name = Solution_Name;
Previous_Table_Name = Table_Name;
}
***** Der below Code durchgeführt add, aber das NODE.ADD auftritt nicht tt.
wenn ((Previous_Table_Name! = Table_Name) && (Previous_Solution_Name == Solution_Name))
{
SolutionNode.Nodes.Add (TableNode);
TableNode.Nodes.Add (ColumnNode);
}
wenn ((Previous_Table_Name == Table_Name) && (Previous_Solution_Name == Solution_Name))
{
TableNode.Nodes.Add (ColumnNode);
Previous_Table_Name = Table_Name;
}
i++;
}
|