If user.IsRole("测试部经理") Then
DataTables("BUG录入表").LoadFilter ="状态 <> '待提交'"
DataTables("BUG录入表").Load
Tables("BUG录入表").sort = "BUG_ID DESC"
Dim cnt As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","[严重程度] = '死机' And (状态 = '待解决' or 状态 = '未解决')")
e.Form.Controls("超严重BUG").text = "超严重BUG(" & cnt & ")"
Dim cnt11 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","[优先级别] = '立刻(Immediate)' And (状态 = '待解决' or 状态 = '未解决')")
e.Form.Controls("超紧急BUG").text = "超紧急BUG(" & cnt11 & ")"
Dim Page As WinForm.TopicPage
Dim cnt1 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and 提交人邮箱 = '" & user.name & "'")
Dim cnt2 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and 提交人邮箱 = '" & user.name & "'")
Dim cnt3 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and 提交人邮箱 = '" & user.name & "'")
Dim cnt4 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and 提交人邮箱 = '" & user.name & "'")
Dim cnt5 As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","提交人邮箱 = '" & user.name & "' and 状态 <> '待提交'")
Page = e.Form.Controls("TopicBar1").Pages.Add("测试部BUG统计","测试部BUG统计")
Page.Links.Add("待解决的BUG","待解决的BUG(" & cnt1 & ")" )
Page.Links.Add("待验证的BUG","待验证的BUG(" & cnt2 & ")" )
Page.Links.Add("已解决的BUG","已解决的BUG(" & cnt3 & ")" )
Page.Links.Add("未解决的BUG","未解决的BUG(" & cnt4 & ")" )
Page.Links.Add("部组个和BUG","部组个和BUG(" & cnt5 & ")" )
Dim cm d As New S QLCommand
cmd.Conn ecti
Dim dt As DataTable
cmd.CommandText = "SEL ECT * From BUG录入表"
dt = cm d.ExecuteReader()
Dim t1 As WinForm.TreeView = e.Form.Controls("TreeView1")
t1.BuildTree(dt,"测试组名|提交人","测试部门 = '测试部部门'")
t1.Nodes.Insert("显示测试部门所有测试人员提交的BUG",0)
Dim t2 As WinForm.TreeView = e.Form.Controls("TreeView2")
t2.CreateTree(dt,"怀疑模块","","测试部门 = '测试部部门'")
t2.Nodes.Insert("显示测试部门所有模块的BUG",0)
Dim t3 As WinForm.TreeView = e.Form.Controls("TreeView3")
t3.CreateTree(dt,"测试机型","","测试部门 = '测试部部门'")
t3.Nodes.Insert("显示测试部门所有机型的BUG",0)
Dim t4 As WinForm.TreeView = e.Form.Controls("TreeView4")
t4.CreateTree(dt,"测试项目名称","","测试部门 = '测试部部门'")
t4.Nodes.Insert("显示测试部门所有项目的BUG",0)
Dim t5 As WinForm.TreeView = e.Form.Controls("TreeView5")
t5.CreateTree(dt,"软件版本","","测试部门 = '测试部部门'")
t5.Nodes.Insert("显示测试部门所有环境的BUG",0)
End If
With DataTables("BUG录入表")
.LoadOver = "BUG_ID"
.LoadReverse=True
.LoadTop = 22
.LoadPage = 0
.Load()
If .TotalPages = 0 Then
.LoadPage = 0
e.Form.Controls("TextBox1").Value = .LoadPage & "/" & .TotalPages
Else
e.Form.Controls("TextBox1").Value = .LoadPage + 1 & "/" & .TotalPages
End If
End With
e.Form.Controls("请输入BUG ID号").Text = "请输入BUG ID号"
e.Form.Controls("请输入研发全拼").Text = "请输入研发全拼"
e.Form.Controls("请输入测试全拼").Text = "请输入测试全拼"