-- 作者:huhu
-- 发布时间:2015/9/9 16:48:00
-- [求助]TopicBar1和treeview
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代码?谢谢。
|
-- 作者:huhu
-- 发布时间: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
-- 发布时间: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 & ")"
|
-- 作者:huhu
-- 发布时间: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.
此主题相关图片如下:界面1.png
此主题相关图片如下:界面2.png
此主题相关图片如下:界面3.png
|
-- 作者:大红袍
-- 发布时间: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
|