目录树-NodeMouseClick事件:运行一次,要3-5S。
Dim Filter As String = ""
If e.Node.Name = "所有清单" Then
filter = ""
Else
Dim dr As DataRow = e.Node.DataRow
Sele ct Case e.Node.Level
Case 0
Return
Case 1
Return
Case 2
filter = "专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'"
Case 3
If dr.IsNull("三级分部") = True
filter = "专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'and 子目名称 = '" & dr("子目名称") & "'"
'Dim drs As List(of DataRow) = Tables("材料指引").DataTable.Select("选 =1")
'For Each dr1 As DataRow In drs
'dr1("选") = 0
'Next
Else
filter = "专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'and 三级分部 = '" & dr("三级分部") & "'"
End If
Case 4
If dr.IsNull("四级分部") = True
filter = " 三级分部 = '" & dr("三级分部") & "' and 专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'and 子目名称 = '" & dr("子目名称") & "'"
'Dim drs As List(of DataRow) = Tables("材料指引").DataTable.Select("选 =1")
'For Each dr1 As DataRow In drs
'dr1("选") = 0
'Next
Else
filter = " 专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'and 三级分部 = '" & dr("三级分部") & "' and 四级分部 = '" & dr("四级分部") & "'"
End If
Case 5
filter = " 三级分部 = '" & dr("三级分部") & "' and 专业 = '" & dr("专业") & "' and 一级分部 = '" & dr("一级分部") & "' and 二级分部 = '" & dr("二级分部") & "'and 四级分部 = '" & dr("四级分部") & " ' and 子目名称 = '" & dr("子目名称") & "' "
'Dim drs As List(of DataRow) = Tables("材料指引").DataTable.Select("选 =1")
'For Each dr1 As DataRow In drs
'dr1("选") = 0
'Next
End Select
End If
SystemReady = False
Tables("添加清单_table3").StopRedraw
If filter > "" Then
DataTables("清单指引").RemoveFor(filter)
DataTables("清单指引").AppendLoad(filter)
Tables("添加清单_table3").filter = filter
Else
DataTables("清单指引").LoadFilter = filter
DataTables("清单指引").load
Tables("添加清单_table3").filter = filter
End If
Tables("添加清单_table3").ResumeRedraw
SystemReady = True
'Tables("添加清单_table2").filter = filter
[此贴子已经被作者于2017/5/24 10:26:18编辑过]