Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.CreateTree("表a","物料级别",".") For i As Integer = trv.AllNodes.count - 1 To 0 Step -1 Dim nd As WinForm.TreeNode = trv.Allnodes(i) Dim dr As DataRow If nd.Level = 0 Then dr = DataTables("表a").Find("物料级别 like '" & nd.FullPath.Replace("\",".") & ".000'") Else dr = DataTables("表a").Find("物料级别 = '" & nd.FullPath.Replace("\",".") & "'") End If If dr IsNot Nothing nd.text = dr("零件号") End If Next
|