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


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

主题:[求助]TopicBar1和treeview

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | 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()

 

 


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


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

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

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | 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编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | 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


 回到顶部