利用SQLCOmmand 用SQL语句查询
比较简单的做法是,不加载黑名单表的数据,但是加载表结构.
这样就可以利用
If e.DataCol.Name = "身份证号" AndAlso e.DataRow.IsNull(e.DataCol) = False Then Dim fdr As DataRow = DataTables("黑名单").SQLFind("身份证号 = '" & e.DataRow("身份证号") & "' And 黑名单 = True") If fdr IsNot Nothing Then MessageBox.Show(fdr("内容")) End If End I |