另一方法,就是你应该有关联列吧,If e.DataCol.Name = "关联列名" Then
If e.DataRow.IsNull("关联列名") Then
Else
dim dc as datarow = DataTables("库存表").find("关联列名 = ‘“& e.DataRow("关联列名") &”’")
if dc is nothing then
dim nd as datatables("库存表").addnew()
nd("关联列名") = dc("关联列名")
nd("xxx") = dc("xxx")
^……
datatables("库存表").save
end if
end if
end if
[此贴子已经被作者于2015/5/14 23:10:07编辑过]