以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]篩選的問題  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=83351)

--  作者:JoyGum
--  发布时间:2016/4/7 3:05:00
--  [求助]篩選的問題
現在有一難題:
假設我原先表達式 DataTables("A").Find("[訂單] = \'12345\'")
現在我要在這個原有的表達式基礎上加一個條件:RowState = DataRowState.Added 
也就是說:訂單是12345 同時是新增的行
如何能達成?
[此贴子已经被作者于2016/4/7 3:06:04编辑过]

--  作者:Hyphen
--  发布时间:2016/4/7 8:37:00
--  
Dim drs As List(Of DataRow) = DataTables("表A").Select("[訂單] = \'12345\'")
For Each dr As DataRow In drs
    If dr.RowState = DataRowState.Added Then
        \'其它代码
    End If
Next