If messagebox.show("数据将被复制到库存表,请确认准确与否","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Warning) = DialogResult.Yes Then
Dim Cols1() As String = {"入库日期","入库编号","入库日期统计","客户","订单号","克重","门幅","缸号","颜色","重量","匹数","仓位","销售人员","品名","入库类型","标注"}
Dim Cols2() As String = {"入库日期","入库编号","入库日期统计","客户","订单号","克重","门幅","缸号","颜色","重量","匹数","仓位","销售人员","品名","入库类型","标注"}
For Each dr1 As DataRow In DataTables("入库表").datarows
If DataTables("库存表").Find("入库编号 = '" & r("入库编号") & "'") Is Nothing Then
Dim dr2 As DataRow = DataTables("库存表").addnew()
For i As Integer = 0 To Cols1.length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
dr2.save
Next
End If
End If
请问上面的代码有什么问题吗
If DataTables("库存表").Find("入库编号 = '" & r("入库编号") & "'") Is Nothing Then 是不要重复的行再被复制到库存表,
好像感觉不完善