Foxtable(狐表)用户栏目专家坐堂 → 保存成功的提示


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

主题:保存成功的提示

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


加好友 发短信
等级:二尾狐 帖子:593 积分:5538 威望:0 精华:0 注册:2012/6/29 19:11:00
保存成功的提示  发帖心情 Post By:2017/5/14 18:15:00 [显示全部帖子]

以下代码是写在beforesavedatarow事件里的,在保存的时候判断必填项是否都已填写完整,如果不完整给出提示,并定位到这一行;除此以外,我还想当数据已经全部保存以后,给出“保存成功”的提示,如何做才能不是保存一行提示一行呢?

 

With e.DataRow
    If .IsNull("ProcessNo") And .IsNull("SamplePart") And .IsNull("ProcessTeam") And .IsNull("ProcessMachine") And .IsNull("ProcessName") And .IsNull("processDescription") Then    '如果办单号,客户,款号,尺码,颜色都为空,则自动认为是无办单,系统自动删除;
        e.DataRow.Delete
    Else
        If .IsNull("ProcessNo") Then
            Dim Index As Integer
            Index = Tables("MainSchedule.ProcessSchdule").FindRow(e.DataRow) '找出此行的基础信息是有为空的值
            If Index > -1 Then '如果找到此行
                Tables("MainSchedule.ProcessSchdule").Position = Index '将焦点定位到此行
            End If
            msgbox("【序号】不能为空,保存失败")
            e.Cancel = True '取消存盘
        ElseIf .IsNull("SamplePart") Then
            Dim Index As Integer
            Index = Tables("MainSchedule.ProcessSchdule").FindRow(e.DataRow) '找出此行的基础信息是有为空的值
            If Index > -1 Then '如果找到此行
                Tables("MainSchedule.ProcessSchdule").Position = Index '将焦点定位到此行
            End If
            msgbox("【办房部位】不能为空,保存失败")
            e.Cancel = True '取消存盘
        ElseIf .IsNull("ProcessTeam") Then
            Dim Index As Integer
            Index = Tables("MainSchedule.ProcessSchdule").FindRow(e.DataRow) '找出此行的基础信息是有为空的值
            If Index > -1 Then '如果找到此行
                Tables("MainSchedule.ProcessSchdule").Position = Index '将焦点定位到此行
            End If
            msgbox("【办房工艺分配】不能为空,保存失败")
            e.Cancel = True '取消存盘
        ElseIf .IsNull("ProcessMachine") Then
            Dim Index As Integer
            Index = Tables("MainSchedule.ProcessSchdule").FindRow(e.DataRow) '找出此行的基础信息是有为空的值
            If Index > -1 Then '如果找到此行
                Tables("MainSchedule.ProcessSchdule").Position = Index '将焦点定位到此行
            End If
            msgbox("【操作设备】不能为空,保存失败")
            e.Cancel = True '取消存盘
        Else
            Return
        End If
    End If
End With


 回到顶部