错误提示:
此主题相关图片如下:1.jpg
代码如下:
Dim Filter As String
If e.Node.Text = "加载所有数据" Then
Filter = ""
Else
Dim dr As DataRow = e.Node.DataRow '获取生成此节点的行
Dim pname As String = dr("外协完成")
Dim Year As Integer = dr("年")
Dim Month As Integer = dr("月")
Dim pname As String = dr("外协厂")
Select Case e.Node.Level
Case 0
Filter ="[外协完成] = " & iif(dr("外协完成") = False, 0, 1)
Case 1
Filter ="Year(日期) = " & Year
Case 2
Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month
Case 3
Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month & " And 外协厂 = '" & pname & "'"
End Select
End If
With DataTables("外协管理")
.LoadFilter = Filter
.LoadPage = 0
.LoadTop = 10
.Load()
e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With