Foxtable(狐表)用户栏目专家坐堂 → [求助]TopicBar1和treeview


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

主题:[求助]TopicBar1和treeview

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


加好友 发短信
等级:五尾狐 帖子:1182 积分:8225 威望:0 精华:0 注册:2015/3/30 10:44:00
[求助]TopicBar1和treeview  发帖心情 Post By:2015/9/9 16:48:00 [只看该作者]

TopicLinkClick代码
Select  Case e.Link.Name
    Case  "待我解决的BUG"
        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 & ")"
        DataTables("BUG研发表").loadFilter = "状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'"
        DataTables("BUG研发表").Load()
        Tables("BUG研发表").sort = "BUG_ID DESC"

.

.

.

NodeMouseDoubleClick代码:

If e.Node.Text <> "显示'" & user.group & "'所有研发的BUG" Then
    Select Case e.Node.Level
        Case 0
            Dim cnt1 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '待解决' and 模块维护人 = '" & e.Node.Text & "'")
            e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("待我解决的BUG").Text = "待我解决的BUG(" & cnt1 & ")"
            Dim cnt2 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已更新' and 模块维护人 = '" & e.Node.Text & "'")
            e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已更新的BUG").Text = "我已更新的BUG(" & cnt2 & ")"
            Dim cnt3 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '已解决' and 模块维护人 = '" & e.Node.Text & "'")
            e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我已解决的BUG").Text = "我已解决的BUG(" & cnt3 & ")"
            Dim cnt4 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","状态 = '未解决' and 模块维护人 = '" & e.Node.Text & "'")
            e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我未解决的BUG").Text = "我未解决的BUG(" & cnt4 & ")"
            Dim cnt5 As Integer = DataTables("BUG研发表").SQLCompute("Count(BUG_ID)","模块维护人 = '" & e.Node.Text & "'")
            e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & cnt5 & ")"
            Filter = "[模块维护人] = '" & e.Node.Text & "'  and [研发组名] = '" & user.group & " '"
            DataTables("BUG研发表").loadFilter = Filter
            DataTables("BUG研发表").Load()

.

.

.

 

问题:虽然双击treeview的某个节点,TopicBar1对每个page进行了统计。

但是单击链接TopicLinkClick只会对模块维护人邮箱 = '" & user.name & "'进行加载数据。不会对模块维护人 = '" & e.Node.Text & "'进行加载数据。

如果修改TopicLinkClick代码?谢谢。


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


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

Dim trv As WinForm.TreeView = e.Form.Controls("Treeview1")

If trv.SelectedNode IsNot Nothing Then
    DataTables("BUG研发表").loadFilter = "状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "' and [模块维护人] = '" &  trv.SelectedNode.Text & "' "
Else
    DataTables("BUG研发表").loadFilter = "状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'"
End If


DataTables("BUG研发表").Load()

 

 


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


加好友 发短信
等级:五尾狐 帖子:1182 积分:8225 威望:0 精华:0 注册:2015/3/30 10:44:00
  发帖心情 Post By:2015/9/10 16:21:00 [只看该作者]

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")

Select  Case e.Link.Name
    Case  "待我解决的BUG"
        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 & ")"
                msgbox(1)
                DataTables("BUG研发表").loadFilter = "状态 = '待解决' and [模块维护人] = '" &  t1.SelectedNode.Text & "'"
                DataTables("BUG研发表").Load()
                Tables("BUG研发表").sort = "BUG_ID DESC"
                msgbox(2)
            Else
                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 & ")"
                msgbox(3)
                DataTables("BUG研发表").loadFilter = "状态 = '待解决' and [研发组名] = '" &  user.group & "'"
                DataTables("BUG研发表").Load()
                Tables("BUG研发表").sort = "BUG_ID DESC"
                msgbox(4)
            End If
        Else
            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 & ")"
            DataTables("BUG研发表").loadFilter = "状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'"
            DataTables("BUG研发表").Load()
            Tables("BUG研发表").sort = "BUG_ID DESC"
        End If
        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 & ")"
                DataTables("BUG研发表").loadFilter = "状态 = '待解决' and [怀疑模块] = '" &  t2.SelectedNode.Text & "'"
                DataTables("BUG研发表").Load()
                Tables("BUG研发表").sort = "BUG_ID DESC"
            Else
                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 & ")"
                DataTables("BUG研发表").loadFilter = "状态 = '待解决' and [研发组名] = '" &  user.group & "'"
                DataTables("BUG研发表").Load()
                Tables("BUG研发表").sort = "BUG_ID DESC"
            End If
        Else
            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 & ")"
            DataTables("BUG研发表").loadFilter = "状态 = '待解决' and 模块维护人邮箱 = '" & user.name & "'"
            msgbox(5)
            DataTables("BUG研发表").Load()
            Tables("BUG研发表").sort = "BUG_ID DESC"
        End If

 

里面有t1,t2,t3,t4,t5 tree,经过调试,选择了t1的某个节点,然后点击topicbar的某一个,最终发现执行了t2的最后一个msgbos(5).

我知道这样写代码有问题,不知道怎么调整,另外能把代码改简洁一下不。


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


加好友 发短信
等级:狐神 帖子:5015 积分:25363 威望:0 精华:0 注册:2015/8/18 9:21:00
  发帖心情 Post By:2015/9/10 17:04:00 [只看该作者]

以下是引用huhu在2015/9/10 16:21:00的发言:

               ......

                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 & ")"

......

看不懂你的逻辑。不过上面引用的这块代码可以这样写,应该效率会高点

 

Dim cmd As New SQLCommand'
Dim dt As DataTable'以上2句放到case和if之间


cmd.CommandText = "sele ct [状态],count(BUG_ID) as 数量 fr om {BUG研发表} where  [模块维护人] = '" & t1.SelectedNode.Text & "' gro up by 状态"
dt = cmd.ExecuteReader()

Dim linkText As String
Dim count As Integer
For Each dr As DataRow In dt.DataRows
    linkText = "我" & dr("状态") & "的BUG"
    e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links(linkText ).Text = linkText  & "(" & dr("数量") & ")"
    count = count + dr("数量")
Next
e.Form.Controls("TopicBar1").Pages("挂我名下的BUG").Links("我的所有的BUG").Text = "我的所有的BUG(" & count & ")"


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


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

不知道你想表达什么,做一个简单的例子说明意图。

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


加好友 发短信
等级:五尾狐 帖子:1182 积分:8225 威望:0 精华:0 注册:2015/3/30 10:44:00
  发帖心情 Post By:2015/9/10 19:09:00 [只看该作者]

开发者密码liujy

验证请用user:wangjingfu@bdcom.com.cn   pwd:bdcom来验证。

博达BUG综合管理系统----》研发查询修改系统,如界面1

tree选择“按照组别查询",双击某个节点,比如显示ONU组所有研发的BUG,topicbar进行了针对这个节点的统计。如界面2.

然后点击topicbar的某个链接,比如我的所有的BUG,如界面3,发现table统计变为了登陆者的数据了。如界面4

注意一下。未点击我的所有的BUG链接是,统计结果是2.点击了变为了1.

 

 

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:临时版本跟踪系统1225.rar


 


图片点击可在新窗口打开查看此主题相关图片如下:界面1.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:界面2.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:界面3.png
图片点击可在新窗口打开查看


 


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


加好友 发短信
等级:五尾狐 帖子:1182 积分:8225 威望:0 精华:0 注册:2015/3/30 10:44:00
  发帖心情 Post By:2015/9/10 19:09:00 [只看该作者]

 


图片点击可在新窗口打开查看此主题相关图片如下:界面4.png
图片点击可在新窗口打开查看


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


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

 

[此贴子已经被作者于2015/9/10 20:08:57编辑过]

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


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

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


 回到顶部