

此主题相关图片如下:rk.png

入库是这样的,

此主题相关图片如下:kc.png


库存是这样的
现在入库的商品编号,批号,想入到库存里有同样的商品编号,批号,而且有库存的货位号里去,然后数量自动能更新,这样能行吗
Select Case e.DataCol.name
Case "货位号"
Dim dr As DataRow = DataTables("库存").Find("货位号 = '" & e.OldValue & "'")
msgbox(2)
If dr Is Nothing Then
msgbox(11)
dr = DataTables("库存").AddNew()
dr("商品编号") = e.DataRow("商品编号")
dr("通用名") = e.DataRow("通用名")
dr("批号") = e.DataRow("批号")
dr("规格") = e.DataRow("规格")
dr("入库数量") = e.DataRow("入库数量")
dr("入库类型") = e.DataRow("入库类型")
dr("货位号") = e.DataRow("货位号")
dr("单价") = e.DataRow("单价")
Else
msgbox(22)
Dim jr As Row = Tables("采购订单.入库").Current
Dim kr As DataRow = DataTables("库存").Find("货位号 Is Null")
kr("货位号") = jr("货位号")
End If
End Select
DataColChanged事件是这样的代码
设置了重复值的话,库存货位号就会自动变成空白的
[此贴子已经被作者于2018/5/29 16:25:02编辑过]