Dim t1 As WinForm.TreeView =e.Form.Controls("TreeView1")
Dim t2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim t3 As WinForm.TreeView = e.Form.Controls("TreeView3")
Dim t4 As WinForm.TreeView = e.Form.Controls("TreeView4")
Dim t5 As WinForm.TreeView = e.Form.Controls("TreeView5")
Dim filter As String = "1=1"
Dim flag As Integer = 0
Dim nbr As WinForm.NavBar = e.Form.Controls("NavBar1")
Select Case nbr.SelectedPage.name
Case "按照组别查询"
If t1.SelectedNode IsNot Nothing Then
If t1.SelectedNode.text <> "显示'" & user.group & "'所有研发的BUG" Then
Dim cnt1 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and [模块维护人] = '" & t1.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"
Dim cnt2 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and [模块维护人] = '" & t1.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已更新的BUG").Text = "我已更新的BUG(" & cnt2 & ")"
Dim cnt3 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and [模块维护人] = '" & t1.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已解决的BUG").Text = "我已解决的BUG(" & cnt3 & ")"
Dim cnt4 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and [模块维护人] = '" & t1.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我未解决的BUG").Text = "我未解决的BUG(" & cnt4 & ")"
Dim cnt5 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","[模块维护人] = '" & t1.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & cnt5 & ")"
filter = " [模块维护人] = '" & t1.SelectedNode.Text & "'"
Else
flag = 1
End If
Else
flag = 2
End If
Case "按照模块查询"
If t2.SelectedNode IsNot Nothing Then
If t2.SelectedNode.text <> "显示'" & user.group & "'所有模块的BUG" Then
Dim cnt1 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and [怀疑模块] = '" & t2.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"
Dim cnt2 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and [怀疑模块] = '" & t2.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已更新的BUG").Text = "我已更新的BUG(" & cnt2 & ")"
Dim cnt3 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and [怀疑模块] = '" & t2.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已解决的BUG").Text = "我已解决的BUG(" & cnt3 & ")"
Dim cnt4 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and [怀疑模块] = '" & t2.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我未解决的BUG").Text = "我未解决的BUG(" & cnt4 & ")"
Dim cnt5 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","[怀疑模块] = '" & t2.SelectedNode.Text & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & cnt5 & ")"
filter = "[怀疑模块] = '" & t2.SelectedNode.Text & "'"
Else
flag = 1
End If
Else
flag = 2
End If
End Select
If flag = 1 Then
Dim cnt1 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and [研发组名] = '" & user.group & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"
Dim cnt2 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and [研发组名] = '" & user.group & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已更新的BUG").Text = "我已更新的BUG(" & cnt2 & ")"
Dim cnt3 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and [研发组名] = '" & user.group & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已解决的BUG").Text = "我已解决的BUG(" & cnt3 & ")"
Dim cnt4 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and [研发组名] = '" & user.group & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我未解决的BUG").Text = "我未解决的BUG(" & cnt4 & ")"
Dim cnt5 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","[研发组名] = '" & user.group & "' ")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & cnt5 & ")"
filter = " [研发组名] = '" & user.group & "'"
ElseIf flag = 2
Dim cnt1 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"
Dim cnt2 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and 模块维护人邮箱 = '" & user.name & "'")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已更新的BUG").Text = "我已更新的BUG(" & cnt2 & ")"
Dim cnt3 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and 模块维护人邮箱 = '" & user.name & "'")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已解决的BUG").Text = "我已解决的BUG(" & cnt3 & ")"
Dim cnt4 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and 模块维护人邮箱 = '" & user.name & "'")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我未解决的BUG").Text = "我未解决的BUG(" & cnt4 & ")"
Dim cnt5 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","模块维护人邮箱 = '" & user.name & "'")
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & cnt5 & ")"
filter = "模块维护人邮箱 = '" & user.name & "'"
End If
msgbox(filter & flag)
Select Case e.Link.Name
Case "待我解决的BUG"
DataTables("BUG研发表").loadFilter = "状态 = '待解决' and " & filter
Case "我已更新的BUG"
DataTables("BUG研发表").loadFilter = "状态 = '已更新' and " & filter
Case "我已解决的BUG"
Case "我未解决的BUG"
Case "我的所有的BUG"
End Select
DataTables("BUG研发表").Load()
Tables("BUG研发表").sort = "BUG_ID DESC"
e.Form.Controls("待解决").Checked = False
e.Form.Controls("已更新").Checked = False
e.Form.Controls("已解决").Checked = False
e.Form.Controls("未解决").Checked = False