Dim tr As WinForm.TreeView = e.Form.Controls("项目类别")
Dim filter As String
Dim drs As new List (of String)
For Each nd As WinForm.TreeNode In tr.AllNodes
If nd.Level = 1
If nd.Checked = True Then
drs.Add(nd.DataRow("合同编号"))
End If
End If
Next
If drs.Count > 0 Then
filter = "合同编号 in ('" & String.Join("','",drs.ToArray()) & "')"
DataTables("施工合同").LoadFilter = filter
DataTables("施工合同").Load
Tables("主窗口_table1").Filter = filter
Tables("主窗口_table1").Sort = "签订日期 desc"
Else
Return
End If