Dim tabmb As WinForm.TabControl = e.Form.Controls("TabControl1")
Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim nd As WinForm.TreeNode
tables("产品类型基础资料1_Table1").fill("select * from tProductType","zmsteel",false)
Dim drs As List(Of DataRow) = DataTables("tProductType").Select("[fName] Is Not Null", "fCode,fName Desc")
For Each dr as DataRow in drs '.Count - 1
If dr.IsNull("fParentCode") Then
nd =tr.Nodes.Add("root1","" & dr("fCode") & " " & dr("fname") & "")
else
nd.Nodes.Add("Sub1"," " & dr("fCode") & " " & dr("fname") & " ")
End If
Next
[此贴子已经被作者于2009-10-9 10:52:32编辑过]