-- 作者:liujywwy
-- 发布时间:2015/1/9 16:51:00
-- [求助]TopicBar显示统计信息咋就不对呢?
afterload代码如下:
Dim Page As WinForm.TopicPage Dim cnt1 As Integer = DataTables("BUG录入表").Compute("Count(BUG_ID)","状态 = \'待解决\' and 提交人 = \'" & user.name & "\'") Dim cnt2 As Integer = DataTables("BUG录入表").Compute("Count(BUG_ID)","状态 = \'已更新\' and 提交人 = \'" & user.name & "\'") Dim cnt3 As Integer = DataTables("BUG录入表").Compute("Count(BUG_ID)","状态 = \'已解决\' and 提交人 = \'" & user.name & "\'") Dim cnt4 As Integer = DataTables("BUG录入表").Compute("Count(BUG_ID)","状态 = \'未解决\' and 提交人 = \'" & 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 & ")"
TopicLinkClick代码如下:
DataTables("BUG录入表").loadFilter = "" DataTables("BUG录入表").Load() Dim Page As WinForm.TopicPage
Select Case e.Link.Name Case "我提交的BUG" DataTables("BUG录入表").loadFilter = "状态 = \'待解决\' and 提交人 = \'" & user.name & "\'" DataTables("BUG录入表").Load() Tables("BUG录入表").sort = "BUG_ID DESC" Case "待验证的BUG" DataTables("BUG录入表").loadFilter = "状态 = \'已更新\' and 提交人 = \'" & user.name & "\'" DataTables("BUG录入表").Load() Tables("BUG录入表").sort = "BUG_ID DESC" Case "已解决的BUG" DataTables("BUG录入表").loadFilter = "状态 = \'已解决\' and 提交人 = \'" & user.name & "\'" DataTables("BUG录入表").Load() Tables("BUG录入表").sort = "BUG_ID DESC" Case "未解决的BUG" DataTables("BUG录入表").loadFilter = "状态 = \'未解决\' and 提交人 = \'" & user.name & "\'" DataTables("BUG录入表").Load() Tables("BUG录入表").sort = "BUG_ID DESC" End Select
|