Foxtable(狐表)用户栏目专家坐堂 → [求助]beforclose


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

主题:[求助]beforclose

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


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

Dim e =args(0)
Dim tbname As String="fa0101_fa0101"
Dim Result As DialogResult
If Tables(tbname).Current IsNot Nothing Then
    If Tables(tbname).Current.DataRow.RowState<>DataRowState.Unchanged Then
        'Result = MessageBox.Show("是否退出?" & vbcrlf & "【是】将退出保存,【否】将退出,【取消】将返回继续编辑?","提示",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Information)
        Result = MessageBox.Show(e.Form.baseform,"是否退出?" & vbcrlf & "【是】将退出保存,【否】将退出,【取消】将返回继续编辑?","提示",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Information)
        If Result = DialogResult.Yes Then
            If Tables(tbname).Current("id")="" Then
                e.Cancel=True
            End If
        Else If Result = DialogResult.Cancel Then
            e.Cancel=True  '这块没有拦截成功''
            'e.Form.baseform.BringToFront
        Else If Result = DialogResult.No Then
            'e.Form.baseform.BringToFront
            Tables(tbname).AllowEdit=True
            Tables(tbname).Current.Reject'这块没有撤销成功'
            Tables(tbname).AllowEdit=False
           
        End If
    Else
        PopMessage("未发生变化不需要保存!","提示",PopIconEnum.Infomation,2)
    End If
Else
    'PopMessage("未发生变化不需要保存!","提示",PopIconEnum.Infomation,2)
End If

 回到顶部