以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  这段代码有错误,不知道该怎么做  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=90752)

--  作者:天蝉一线
--  发布时间:2016/9/21 8:55:00
--  这段代码有错误,不知道该怎么做
Dim bar As WinForm.NavBar = e.sender
Select Case bar.SelectedPage.ButtonText
    Case "预算管理"
    Case "财务管理"
         Dim Page As WinForm.TopicPage
        Dim cnt1 As Integer = DataTables("大额资金支出备案明细表").Compute("Count(_Identify)","审核结果 = \'审核未通过\' And 过会结果=\'\'")
        Dim cnt2 As Integer = DataTables("大额资金支出备案明细表").Compute("Count(_Identify)","审核结果 =\'审核通过\' and 过会结果=\'\'")
        Page = e.Form.Controls("cwgl").Pages.Add("大额资金备案审核信息","大额资金备案审核信息")
        Page.Links.Add("审核未通过","审核未通过(" & cnt1 & ")条" )
        Page.Links.Add("审核通过","审核通过(" & cnt2 & ")条" )
        Page = e.Form.Controls("cwgl").Pages.Add("大额资金备案过会信息","大额资金备案过会信息")
        Dim cnt3 As Integer = DataTables("大额资金支出备案明细表").Compute("Count(_Identify)","过会结果 = \'通过\' And year(申报备案时间) =#"  & Date.Today.year & "#")
        Dim cnt4 As Integer = DataTables("大额资金支出备案明细表").Compute("Count(_Identify)","过会结果 = \'未通过\' And year(申报备案时间) =#"  & Date.Today.year & "#")
        Page.Links.Add("未通过","未通过(" & cnt3 & ")条" )
        Page.Links.Add("通过","通过(" & cnt4 & ")条" )
    Case "系统管理"
End Select

错误信息:

无法将类型为“Foxtable.WinForm.TabControl”的对象强制转换为类型“Foxtable.WinForm.NavBar”。

--  作者:cbt
--  发布时间:2016/9/21 8:59:00
--  
 Dim bar As WinForm.TabControl= e.sender
--  作者:有点蓝
--  发布时间:2016/9/21 9:57:00
--  
事件放错地方了吧