以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]前台和后台的数据同步问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=81728)

--  作者:huhu
--  发布时间:2016/3/4 14:40:00
--  [求助]前台和后台的数据同步问题
Dim dr As DataRow = DataTables("U8物料数量汇总表").SQLFind("入库单号 = \'" & Vars("fckrkdh") & "\' And 物料编码 = \'" & e.DataRow("物料编码") & "\'")
                        If dr IsNot Nothing Then
                            Dim fdr As DataRow = DataTables("非插卡收货扫描").SQLFind("SN = \'" &  e.DataRow("SN") & "\' And _Identify <> " & e.DataRow("_Identify"))
                            If fdr IsNot Nothing Then
                                If  fdr("状态") = "收货重复扫描"  Or fdr("状态") = "收货完成" Then
                                    e.DataRow("数量") = 0
                                    e.DataRow("状态") = "收货重复扫描"
                                    e.DataRow.Save
                                    e.DataRow.locked = True
                                End If
                            Else
                                If (dr("实扫到数量") - dr("总数量") < 0) Then
                                    e.DataRow("库位类别") = dr("库位类别")
                                    e.DataRow("入库单号") = Vars("fckrkdh")
                                    e.DataRow("数量") = 1
                                    dr("实扫到数量") = dr("实扫到数量") + 1-----后台sql已经把实扫到数量值给改了,可是前台表实扫到数量仍然没改。难道每次都load?
                                    dr.save
                                    e.DataRow("状态") = "收货完成"
                                    e.DataRow("收货完成时间") = Date.now
                                    e.DataRow.Save
                                    e.DataRow.locked = True

--  作者:大红袍
--  发布时间:2016/3/4 14:43:00
--  

把此行remove然后再appendLoad进来不行?

 

http://www.foxtable.com/help/topics/2914.htm