Dim Cols1() As String = {"入库编号","品名规格","工序","单位","入库单价","客户数量","过磅数量","应收金额","出库"} Dim Cols2() As String = {"入库编号","品名规格","工序","单位","入库单价","客户数量","过磅数量","应收金额","出库"} For Each dr1 As DataRow In DataTables("入库明细表").Select("[出库] = true") Dim dr2 As DataRow = DataTables("出库明细表").AddNew() For i As Integer = 0 To Cols1.Length -1 If dr1.IsNull(Cols1(i)) Then dr2(Cols2(i)) = Nothing Else dr2(Cols2(i)) = dr1(Cols1(i)) End If Next dr2("客户") = e.Form.Controls("TextBox1").text dr1("已出库") = True Next
|