以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  判断后跨表引用  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=177499)

--  作者:有点灰2
--  发布时间:2022/5/25 7:36:00
--  判断后跨表引用

Select Case e.DataCol.Name
    Case "生产流程单_料废", "生产流程单_工废"
        Dim drf As DataRow = e.DataRow
        If drf("生产流程单_工废")IsNot Nothing  Or drf("生产流程单_料废")IsNot Nothing Then
            If e.DataCol.Name = "生产流程单_判定" AndAlso e.DataRow("生产流程单_判定") = True Then
                Dim nma() As String = {"生产流程单_成品入库","生产流程单_半成品入库","生产通知单_订单编号","生产流程单_工序","生产流程单_作业者","生产流程单_供应商","生产流程单_料废","生产流程单_工废","生产流程单_检验签名"  } 
                Dim nmb() As String = {"废品申报单_成品","废品申报单_半成品" ,"废品申报单_订单编号","废品申报单_工序号","废品申报单_作业者","废品申报单_供应商","废品申报单_料废","废品申报单_工废","废品申报单_品管部"} 
                Dim drh As DataRow = DataTables("不合格品管控系统").AddNew
                For i As Integer = 0 To nma.Length - 1
                    drh(nmb(i)) = e.DataRow(nma(i))
                Next
            End If
        End If
End Select

 


图片点击可在新窗口打开查看此主题相关图片如下:147.png
图片点击可在新窗口打开查看
我想先判断工废和料废有内容之后 在判断判定是否确认  确认后将相关信息传导下一个表   这样写问题在哪呢  怎么不运行
--  作者:有点蓝
--  发布时间:2022/5/25 8:39:00
--  
http://www.foxtable.com/webhelp/topics/1470.htm

Select Case e.DataCol.Name
    Case "生产流程单_料废", "生产流程单_工废"
        Dim drf As DataRow = e.DataRow
        If drf.isnull("生产流程单_工废")=false  AndAlso drf.isnull("生产流程单_料废")=false AndAlso e.DataRow("生产流程单_判定") = True Then
                Dim nma() As String = {"生产流程单_成品入库","生产流程单_半成品入库","生产通知单_订单编号","生产流程单_工序","生产流程单_作业者","生产流程单_供应商","生产流程单_料废","生产流程单_工废","生产流程单_检验签名"  } 
                Dim nmb() As String = {"废品申报单_成品","废品申报单_半成品" ,"废品申报单_订单编号","废品申报单_工序号","废品申报单_作业者","废品申报单_供应商","废品申报单_料废","废品申报单_工废","废品申报单_品管部"} 
                Dim drh As DataRow = DataTables("不合格品管控系统").AddNew
                For i As Integer = 0 To nma.Length - 1
                    drh(nmb(i)) = e.DataRow(nma(i))
                Next

        End If
End Select

--  作者:有点灰2
--  发布时间:2022/5/25 9:37:00
--  
我调试了一下    还是不好使  点击确认后并没有反应      是不是哪块有问题  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1 (6).table

 
--  作者:有点蓝
--  发布时间:2022/5/25 9:50:00
--  
Case "生产流程单_料废", "生产流程单_工废","生产流程单_判定"
--  作者:有点灰2
--  发布时间:2022/5/27 11:09:00
--  

Select Case e.DataCol.Name
    Case "生产流程单_料废", "生产流程单_工废","生产流程单_判定"
        Dim drf As DataRow = e.DataRow
        If drf.isnull("生产流程单_工废")=False  Or drf.isnull("生产流程单_料废")=False AndAlso e.DataRow("生产流程单_判定") = True Then
            Dim nma() As String = {"生产流程单_成品入库","生产流程单_半成品入库","生产通知单_订单编号","生产流程单_工序","生产流程单_作业者","生产流程单_供应商","生产流程单_料废","生产流程单_工废","生产流程单_检验签名"  }
            Dim nmb() As String = {"废品申报单_成品","废品申报单_半成品" ,"废品申报单_订单编号","废品申报单_工序号","废品申报单_作业者","废品申报单_供应商","废品申报单_料废","废品申报单_工废","废品申报单_品管部"}
            Dim drh As DataRow = DataTables("不合格品管控系统").AddNew
            For i As Integer = 0 To nma.Length - 1
                drh(nmb(i)) = e.DataRow(nma(i))
            Next
           
        End If
End Select

 

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1 (6).table

为什么我点击一下 确定按钮   但是另一个表增加相同的两行


图片点击可在新窗口打开查看此主题相关图片如下:705.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:714.png
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2022/5/27 11:29:00
--  
我测试没有问题。应该是勾选了2次吧