Foxtable(狐表)用户栏目专家坐堂 → [求助]增加行出现在第一行


  共有2618人关注过本帖平板打印复制链接

主题:[求助]增加行出现在第一行

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


加好友 发短信
等级:五尾狐 帖子:1165 积分:8129 威望:0 精华:0 注册:2015/3/30 10:44:00
  发帖心情 Post By:2015/12/1 12:22:00 [只看该作者]

If e.DataCol.Name = "SN" Then
    Dim nms() As String = {"数量","物料编码","产品型号","类别","配货单号","工单号","订单号","预入库单号","生产完成日期","预计入库日期"}
    If e.NewValue Is Nothing Then
        For Each nm As String In nms
            e.DataRow(nm) = Nothing
        Next
    Else
        Dim drs As List(Of DataRow) = DataTables("配货单").Select("[SN] = '" & e.NewValue & "'")
        If drs.Count > 0 Then
            SystemReady = False
            For Each dr As DataRow In drs
                Dim ndr As DataRow = e.DataTable.AddNew
                msgbox(drs.count)----------没弹出
                msgbox(ndr("SN"))----------没弹出
                If dr("提示") = "扫描完成" Then
                    For Each nm As String In nms
                        ndr(nm) = dr(nm)
                    Next
                    ndr("提示") = "重复扫描"
                    dr("提示") = "扫描完成"
                    msgbox("已执行")-----------没弹出
                Else
                    For Each nm As String In nms
                        ndr(nm) = dr(nm)
                    Next
                    If e.DataRow("预入库单号") <> e.DataRow("入库单号")  Then
                        ndr("提示") = "非本入库单物料"
                    Else
                        ndr("提示") = "扫描完成"-----都正常赋值
                        dr("提示") = "扫描完成"-----都正常赋值
                        ndr("收货结束时间") = Date.now
msgbox("已执行")-----------没弹出
                    End If
                End If
            Next
            e.DataRow.Delete
            SystemReady = True
        Else
            e.DataRow("提示") = "序列号不存在"
        End If
    End If
End If

 回到顶部
总数 19 1 2 下一页