Foxtable(狐表)用户栏目专家坐堂 → 求助


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

主题:求助

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


加好友 发短信
等级:超级版主 帖子:110574 积分:562760 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/11/3 17:22:00 [显示全部帖子]

Dim idx As String = "-1,"
Dim idx_temp As String = ""
Dim pdr As DataRow = Nothing
Dim count As Integer = 0
Dim cs As String = "户号,户主姓名"
Dim drs As List(Of DataRow) = DataTables("表A").Select("", cs)

For Each dr As DataRow In drs
    Dim flag As Boolean = False
    If pdr IsNot Nothing Then
        For Each c As String In cs.split(",")
            If pdr(c).replace(" ","") <> dr(c).replace(" ", "") Then
                flag = True
                Exit For
            End If
        Next
        If flag Then
            If count > 1 Then
                idx &= idx_temp
            End If
            count = 1
            idx_temp = ""
        Else
            count += 1
            If count = 2 Then idx_temp &= pdr("_Identify") & ","
            idx_temp &= dr("_Identify") & ","
        End If
    Else
        count += 1
    End If
    pdr = dr
Next
If count > 1 Then
    idx &= idx_temp
End If
'Tables("表A").filter = "_Identify not In (" & idx.trim(",") & ")"
Tables("表A").filter = "_Identify In (" & idx.trim(",") & ")"


 回到顶部