dim r as row = tabels("某表").current
if r isnot nothing then
Dim dr As DataRow = DataTables("批次库存").Find("入库批次 = '" & r("入库批次") & "'")
If dr Is Nothing Then
dr = DataTables("批次库存").AddNew()
dr("零件号") = r("零件号")
dr("入库批次") = r("入库批次")
dr("零件批次") = r("零件批次")
dr("部门") = r("部门")
Else
dr("零件号") = r("零件号")
End If
end if