-- 作者:huhu
-- 发布时间:2015/8/27 16:31:00
-- [求助]treeview的数据能在topicbar统计出来吗?
afterload代码如下:
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("显示所有机型的BUG",0) Dim t4 As WinForm.TreeView = e.Form.Controls("TreeView4") t4.CreateTree("BUG研发表","测试项目名称","","研发组名 = \'" & user.group & "\'") t4.Nodes.Insert("显示所有项目的BUG",0) Dim t5 As WinForm.TreeView = e.Form.Controls("TreeView5") t5.CreateTree("BUG研发表","软件版本","","研发组名 = \'" & user.group & "\'") t5.Nodes.Insert("显示所有环境的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 & ")" )
NodeMouseDoubleClick代码如下:
DataTables("BUG研发表").loadFilter = "" DataTables("BUG研发表").Load() Dim Filter As String If e.Node.Text <> "显示\'" & user.group & "\'所有研发的BUG" Then Select Case e.Node.Level Case 0 Filter = "[研发组长] = \'" & e.Node.Text & "\' and [研发组名] = \'" & user.group & " \'" DataTables("BUG研发表").loadFilter = Filter DataTables("BUG研发表").Load() Case 1 Filter = "[模块维护人] = \'" & e.Node.Text & "\' and [研发组名] = \'" & user.group & " \'" DataTables("BUG研发表").loadFilter = Filter DataTables("BUG研发表").Load() End Select Else Filter = "[研发组名] = \'" & user.group & "\' " DataTables("BUG研发表").loadFilter = Filter DataTables("BUG研发表").Load() End If
此主题相关图片如下:界面.png
希望能做到双击按照组别查询treeview中某个节点,能在topicbar统计出这个人的待解决,已更新,已解决,未解决,所以的数量。这样的有办法做到吗?
[此贴子已经被作者于2015/8/27 16:33:20编辑过]
|