--
Dim filter As String
If e.Node.name = "所有考勤" Then
filter = ""
Else
Dim dr As DataRow = e.Node.DataRow
Dim htmc As String = e.Node.DataRow("合同名称")
Dim Year As Integer = e.Node.DataRow("年")
Dim Month As Integer = e.Node.DataRow("月")
Dim dy As Date = new Date(Year ,1,1)
Dim dm As Date = new Date(Year ,Month ,1)
Select Case e.Node.Level
Case 0
Filter ="合同名称 =\'" & htmc & "\'"
Case 1
Filter =" 考勤月份 >= \'" & dy & "\' and 考勤月份 < \'" & dy.AddYears(1) & "\' And 合同名称 = \'" & htmc & "\' "
Case 2
Filter ="考勤月份 >= \'" & dm & "\' and 考勤月份 < \'" & dm.AddMonths(1) & "\' And 合同名称 =\'" & htmc & "\'"
End Select
End If
If filter > "" Then
DataTables("考勤").RemoveFor(filter)
DataTables("考勤").AppendLoad(filter)
Tables("考勤").Filter = filter
Else
DataTables("考勤").loadFilter = filter
DataTables("考勤").load
Tables("考勤").Filter = filter
End If
此主题相关图片如下:5.jpg