以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 填充求助 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=81228) |
-- 作者:jamhuton -- 发布时间:2016/2/22 11:06:00 -- 填充求助 If e.DataCol.Name = "出库拣货" AndAlso e.DataRow("出库拣货") = True Then Dim nma() As String = {"物料品号","物料名称","每箱PC数","进库_箱数","进库_数量","库位号","出库日期"} \'进库明细数据来源列 Dim nmb() As String = {"物料品号","物料名称","每箱PC数","出库_箱数","出库_数量","库位号","出库日期"} \'出库明细数据接收列 Dim dr As DataRow = DataTables("出库明细").AddNew For i As Integer = 0 To nma.Length - 1 dr(nmb(i)) = e.DataRow(nma(i)) Next End If 通过代码拣货填充出库明细,如果打钩打错了,取消打钩,如何删除出口明细上的行?
|
-- 作者:jamhuton -- 发布时间:2016/2/22 11:31:00 -- 就是说打钩对应增加一行,如果取消打钩增加的哪行删除。 |
-- 作者:大红袍 -- 发布时间:2016/2/22 12:30:00 -- 那就必须在 出库明细表 记录原表的主键,类似的参考代码 If e.DataCol.Name = "出库拣货" Then If e.DataRow("出库拣货") = True Then Dim nma() As String = {"_Identify","物料品号","物料名称","每箱PC数","进库_箱数","进库_数量","库位号","出库日期"} \'进库明细数据来源列 Dim nmb() As String = {"唯一标记","物料品号","物料名称","每箱PC数","出库_箱数","出库_数量","库位号","出库日期"} \'出库明细数据接收列 Dim dr As DataRow = DataTables("出库明细").AddNew For i As Integer = 0 To nma.Length - 1 dr(nmb(i)) = e.DataRow(nma(i)) Next Else DataTables("出库明细").deletefor("唯一标记 = \'" & e.DataRow("_Identify") & "\'") End If End If
|
-- 作者:jamhuton -- 发布时间:2016/2/22 12:41:00 -- 老师,是不是增加一列“唯一标记”? |
-- 作者:jamhuton -- 发布时间:2016/2/22 12:42:00 -- 谢谢老师,元宵节快乐!!! |