Foxtable(狐表)用户栏目专家坐堂 → 请教甜大师


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

主题:请教甜大师

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/11 22:59:00 [显示全部帖子]

Dim dr As DataRow = DataTables("表A").DataRows(1)
Dim ary() As String = {"您好","他好","都好","大师好","全都好"}
Dim count As Integer = 0
For Each dc As DataCol In DataTables("表A").DataCols
    If array.IndexOf(ary, dr(dc.Name)) > -1 Then
        count += 1
    End If
    If count > 2 Then
        msgbox("不符合")
        Exit For
    End If
Next

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/12 9:02:00 [显示全部帖子]

 你就不会变通么

 

For Each dr As DataRow In DataTables("表A").DataRows
    Dim ary() As String = {"您好","他好","都好","大师好","全都好"}
    Dim count As Integer = 0
    For Each dc As DataCol In DataTables("表A").DataCols
        If array.IndexOf(ary, dr(dc.Name)) > -1 Then
            count += 1
        End If
        If count > 2 Then
            msgbox(dr("_Identify") & " 不符合")
            Exit For
        End If
    Next
Next


 回到顶部