Dim drs As List(of DataRow)=DataTables("销售查询").Select("[客户编码]='" & e.DataRow("客户编码") &"' And [产品编码]='" & e.dataRow("产品编码") &"'")
If drs.count>0
Dim Cols1() As String = {"出货日期","包装规格","出货方式","出货数量","包装单位","出货单价"}
Dim Cols2() As String = {"出货日期","包装规格","出货方式","出货数量","包装单位","出货单价"}
For Each dr1 As DataRow In drs
Dim dr2 As Row = Tables("预售单_table10").AddNew()
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
Tables("预售单_table10").sort="出货日期 DESC"
End If
只想在Tables("预售单_table10")添加最近5条数据,而不是全部的数据,请问怎么做?谢谢