Foxtable(狐表)用户栏目专家坐堂 → 自动增加行问题


  共有2473人关注过本帖树形打印复制链接

主题:自动增加行问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/31 14:42:00 [显示全部帖子]


Select Case e.DataCol.name
    Case "领料情况_分机组"
        If e.newvalue = False Then
            DataTables("领料清单").DeleteFor("编号='" & e.DataRow("编号") & "'")
        Else
            If e.DataRow("物资说明") = "外购件" Then
                For i As Integer = 1 To 2
                    Dim ndr As DataRow = DataTables("领料清单").AddNew
                    ndr("编号") = e.DataRow("编号")
                    ndr("预算编号") = e.DataRow("预算编号")
                    ndr("物资说明") = e.DataRow("物资说明")
                    ndr("名称") = e.DataRow("物资名称")
                    ndr("规格") = e.DataRow("规格")
                    ndr("材质") = e.DataRow("材质")
                    ndr("单位") = e.DataRow("单位")
                    ndr("领料数量") = e.DataRow("到货数量") / 2
                Next
            End If
            If e.DataRow("物资说明") = "电气" Then
                For i As Integer = 1 To 2
                    Dim ndr As DataRow = DataTables("领料清单").AddNew
                    ndr("编号") = e.DataRow("编号")
                    ndr("预算编号") = e.DataRow("预算编号")
                    ndr("物资说明") = e.DataRow("物资说明")
                    ndr("名称") = e.DataRow("物资名称")
                    ndr("规格") = e.DataRow("规格")
                    ndr("材质") = e.DataRow("材质")
                    ndr("单位") = e.DataRow("单位")
                    ndr("领料数量") = e.DataRow("到货数量") / 2
                Next
            End If
            If e.DataRow("物资说明") = "焊材" Then
                For i As Integer = 1 To 2
                    Dim ndr As DataRow = DataTables("领料清单").AddNew
                    ndr("编号") = e.DataRow("编号")
                    ndr("预算编号") = e.DataRow("预算编号")
                    ndr("物资说明") = e.DataRow("物资说明")
                    ndr("名称") = e.DataRow("物资名称")
                    ndr("规格") = e.DataRow("规格")
                    ndr("材质") = e.DataRow("材质")
                    ndr("单位") = e.DataRow("单位")
                    ndr("领料数量") = e.DataRow("到货数量") / 2
                Next
            End If
        end if
    Case "领料情况_不分机组"
        if e.newvalue = false then
            DataTables("领料清单").DeleteFor("编号='" & e.DataRow("编号") & "'")
        else
            If e.DataRow("物资说明") = "外购件" Then
                Dim ndr1 As DataRow = DataTables("领料清单").AddNew
                ndr1("编号") = e.DataRow("编号")
                ndr1("预算编号") = e.DataRow("预算编号")
                ndr1("生产令号") = e.DataRow("生产令号")
                ndr1("项目名称") = e.DataRow("项目名称")
                ndr1("物资说明") = e.DataRow("物资说明")
                ndr1("名称") = e.DataRow("物资名称")
                ndr1("规格") = e.DataRow("规格")
                ndr1("材质") = e.DataRow("材质")
                ndr1("单位") = e.DataRow("单位")
                ndr1("领料数量") = e.DataRow("数量")
            End If
            If e.DataRow("物资说明") = "电气" Then
                Dim ndr1 As DataRow = DataTables("领料清单").AddNew
                ndr1("编号") = e.DataRow("编号")
                ndr1("预算编号") = e.DataRow("预算编号")
                ndr1("生产令号") = e.DataRow("生产令号")
                ndr1("项目名称") = e.DataRow("项目名称")
                ndr1("物资说明") = e.DataRow("物资说明")
                ndr1("名称") = e.DataRow("物资名称")
                ndr1("规格") = e.DataRow("规格")
                ndr1("材质") = e.DataRow("材质")
                ndr1("单位") = e.DataRow("单位")
                ndr1("领料数量") = e.DataRow("数量")
            End If
            If e.DataRow("物资说明") = "焊材" Then
                Dim ndr1 As DataRow = DataTables("领料清单").AddNew
                ndr1("编号") = e.DataRow("编号")
                ndr1("预算编号") = e.DataRow("预算编号")
                ndr1("生产令号") = e.DataRow("生产令号")
                ndr1("项目名称") = e.DataRow("项目名称")
                ndr1("物资说明") = e.DataRow("物资说明")
                ndr1("名称") = e.DataRow("物资名称")
                ndr1("规格") = e.DataRow("规格")
                ndr1("材质") = e.DataRow("材质")
                ndr1("单位") = e.DataRow("单位")
                ndr1("领料数量") = e.DataRow("数量")
            end if
        End If
End Select

 回到顶部