Foxtable(狐表)用户栏目专家坐堂 → [求助]treeview的数据能在topicbar统计出来吗?


  共有2614人关注过本帖树形打印复制链接

主题:[求助]treeview的数据能在topicbar统计出来吗?

帅哥哟,离线,有人找我吗?
huhu
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1182 积分:8225 威望:0 精华:0 注册:2015/3/30 10:44:00
[求助]treeview的数据能在topicbar统计出来吗?  发帖心情 Post By:2015/8/27 16:31:00 [只看该作者]

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编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/8/27 18:45:00 [只看该作者]

 

Dim cnt1 As Integer = DataTables("BUG研发表").Compute("Count(BUG_ID)","状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'")

e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"


 回到顶部