Select Case e.DataCol.name Case "采购日期" if e.oldValue is not nothing then
Dim dr As DataRow = DataTables("库存清单库").Find("采购日期 = #" & e.OldValue & "#")
If dr Is Nothing Then
dr = DataTables("库存清单库").AddNew()
dr("采购日期") = e.DataRow("采购日期")
dr("配件名称") = e.DataRow("配件名称")
dr("型号") = e.DataRow("型号")
dr("生产厂家") = e.DataRow("生产厂家")
dr("采购数量") = e.DataRow("采购数量")
Else
dr("产品编号") = e.DataRow("产品编号")
End If
end if
End Select