Foxtable(狐表)用户栏目专家坐堂 → 窗口CurrentChanged事件


  共有1635人关注过本帖平板打印复制链接

主题:窗口CurrentChanged事件

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


加好友 发短信
等级:三尾狐 帖子:767 积分:6119 威望:0 精华:0 注册:2018/2/1 17:26:00
窗口CurrentChanged事件  发帖心情 Post By:2018/11/15 18:11:00 [只看该作者]

窗口CurrentChanged事件中写入下面代码,为什么只执行红色部分代码?

 

If e.Table.Current Is Nothing Then '如果Current为Nothing
    Return
Else
    '''显示或关闭菜单按钮
    For Each dr As Row In CurrentTable.Rows
        Dim sit As WinForm.StripItem = e.Form.Strips("主菜单").Items("txbf")
        Dim ns As Integer = DataTables("图像明细").Compute("Count([_Identify])","图像编号 = '" & dr("附件编号") & "'")
        If ns > 0 Then
            sit.Enabled = True
        Else
            sit.Enabled = False
            Return
        End If

       
        Dim pstr As WinForm.StripItem = e.Form.Strips("主菜单").Items("Pdf_open")
        Dim pfil As String = "文件名称 = '" & dr("文件名称") & "' And 文件附件编号 = '" & dr("附件编号") & "' And 文件后缀 = '.pdf'"
        Dim pcnt As Integer = DataTables("资料明细").Compute("Count([_Identify])",pfil)
        If pcnt > 0 Then
            pstr.Enabled = True
        Else
            pstr.Enabled = False
        End If
       
       
        Dim wstr As WinForm.StripItem = e.Form.Strips("主菜单").Items("Word_open")
        Dim wfil As String = "文件名称 = '" & dr("文件名称") & "' And 文件附件编号 = '" & dr("附件编号") & "' And 文件后缀 = '.doc'"
        Dim wcnt As Integer = DataTables("资料明细").Compute("Count([_Identify])",wfil)
        If wcnt > 0 Then
            wstr.Enabled = True
        Else
            wstr.Enabled = False
        End If
    Next
End If  

 

 

 


 回到顶部