以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  求助自动输入  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=113801)

--  作者:cool314156
--  发布时间:2018/1/23 13:00:00
--  求助自动输入
 

入库_DataColChanged

 

Select Case e.DataCol.Name

Case "通用名"

If e.DataRow.IsNull("通用名") = False Then \'如果已经输入订单编号

If e.DataRow.GetChildRows("通用名").Count = 0 Then \'而且无订单明细

Dim tym As DataRow = DataTables("库存").AddNew()

tym("通用名") = e.DataRow("通用名")

End If

End If

End Select

 

 

 

库存_DataColChanged

 

If e.DataCol.Name = "通用名" Then

If e.NewValue Is Nothing Then

e.DataRow("商品编号") = Nothing

e.DataRow("批号") = Nothing

e.DataRow("规格") = Nothing

e.DataRow("数量") = Nothing

e.DataRow("货位号") = Nothing

Else

Dim dr As DataRow

dr = e.DataRow.GetParentRow("入库")

If dr IsNot Nothing

e.DataRow("商品编号") = dr("商品编号")

e.DataRow("批号") = dr("批号")

e.DataRow("规格") = dr("规格")

e.DataRow("数量") = dr("数量")

e.DataRow("货位号") = dr("货位号")

End If

End If

End If

 

 

入库和库存已经通过通用名关联了,但是测试结果在通用名的地方编辑之后,只要商品编号自动填入了

其他信息不能输入,求大大看看是什么问题

[此贴子已经被作者于2018/1/23 13:02:07编辑过]

--  作者:有点甜
--  发布时间:2018/1/23 14:33:00
--  

参考

 

http://www.foxtable.com/webhelp/scr/2490.htm