以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  想在下面的代码上加上一个筛选条件,谢谢!!  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=38013)

--  作者:jinzhengbe
--  发布时间:2013/7/17 16:32:00
--  想在下面的代码上加上一个筛选条件,谢谢!!

Dim Cols1() As String = {"productID","ID","color","weight","productNum","productRemarks","ischeck","caseNo","leaderID"}
Dim Cols2() As String = {"productID","订单ID","订单颜色","订单大小","订单数量","订单备注","订单状态","订单号码","客户ID"}
For Each dr1 As DataRow In DataTables("订单详情").Select("[id] Is not Null")
    Dim dr2 As DataRow = DataTables("新订单").AddNew()
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Next

想在这单代码中加工一个条件。 只在 《订单详情表》  中 选 color= 1的 行导入到  《新订单》 表 代码应该怎么写? 写到什么位置呢?谢谢了!!!


--  作者:Bin
--  发布时间:2013/7/17 16:35:00
--  
For Each dr1 As DataRow In DataTables("订单详情").Select("color= 1")