Select Case user.Group
Case "开发者"
DataTables("BUG录入表").LoadFilter ="测试部门 = '测试部部门'"
DataTables("BUG录入表").Load
Case "测试epron","测试switch","测试IEswitch"
DataTables("BUG录入表").LoadFilter ="测试部门 = '测试部部门' and (测试组名 = '测试epon' or 测试组名 = '测试switch' or 测试组名 = '测试IEswitch')"
DataTables("BUG录入表").Load
Case "测试router"
DataTables("BUG录入表").LoadFilter ="测试部门 = '测试部部门' and 测试组名 = '测试router'"
DataTables("BUG录入表").Load
End Select
Tables("BUG录入表").sort = "BUG_ID DESC"
Select Case user.name
Case "开发者"
Dim cnt As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","[严重程度] = '紧急(Critical)'")
e.Form.Controls("超紧急BUG").text = "超紧急BUG(" & cnt & ")"
Case "chenhaitao@bdcom.com.cn","zoupingping@bdcom.com.cn","mahuiying@bdcom.com.cn","zhengyi@bdcom.com.cn"
Dim cnt As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","[严重程度] = '紧急(Critical)' and [测试组名] = '" & user.group & "' And (状态 = '待解决' or 状态 = '未解决')")
e.Form.Controls("超紧急BUG").text = "超紧急BUG(" & cnt & ")"
Case Else
Dim cnt As Integer = DataTables("BUG录入表").SQLCompute("Count(BUG_ID)","[严重程度] = '紧急(Critical)' and 提交人邮箱 = '" & user.name & "' And (状态 = '待解决' or 状态 = '未解决') ")
e.Form.Controls("超紧急BUG").text = "超紧急BUG(" & cnt & ")"
End Select
Dim t1 As WinForm.TreeView
t1 =e.Form.Controls("TreeView1")
t1.BuildTree("BUG录入表", "测试组名|提交人","测试组名 = '" & user.group & "'")
t1.Nodes.Insert("显示'" & user.group & "'所有测试人员提交的BUG",0)
Dim t2 As WinForm.TreeView = e.Form.Controls("TreeView2")
t2.CreateTree("BUG录入表","怀疑模块","","测试组名 = '" & user.group & "'")
t2.Nodes.Insert("显示'" & user.group & "'所有模块的BUG",0)
Dim t3 As WinForm.TreeView = e.Form.Controls("TreeView3")
t3.CreateTree("BUG录入表","测试机型","","测试组名 = '" & user.group & "'")
t3.Nodes.Insert("显示'" & user.group & "'所有机型的BUG",0)
Dim t4 As WinForm.TreeView = e.Form.Controls("TreeView4")
t4.CreateTree("BUG录入表","测试项目名称","","测试组名 = '" & user.group & "'")
t4.Nodes.Insert("显示'" & user.group & "'所有项目的BUG",0)
Dim t5 As WinForm.TreeView = e.Form.Controls("TreeView5")
t5.CreateTree("BUG录入表","软件版本","","测试组名 = '" & user.group & "'")
t5.Nodes.Insert("显示'" & user.group & "'所有环境的BUG",0)
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 & "'")
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 & ")" )
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 = "请输入测试全拼"