Foxtable(狐表)用户栏目专家坐堂 → 关于DataColChanging的设置


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

主题:关于DataColChanging的设置

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/4/23 9:30:00 [只看该作者]

  代码这样写,取消按钮,就把日期设置成nothing,意见设置成nothing。自己调试一下。

 

Select Case e.DataCol.name
    Case "审核意见", "审核日期"
        If e.NewValue <> Nothing AndAlso e.OldValue <> Nothing Then
            msgbox("已审核")
            e.cancel = True
        Else If e.DataRow.IsNull("批准日期") = False OrElse e.DataRow.IsNull("终审意见") Then
            msgbox("已提交,不能再修改")
            e.cancel = True
        End If
    Case "批准意见" , "批准日期"
        If e.NewValue <> Nothing AndAlso e.OldValue <> Nothing Then
            msgbox("已批准")
            e.Cancel = True
        Else If e.DataRow.IsNull("终审日期") = False Then
            msgbox("已提交")
            e.cancel = True
        End If
    Case "终审意见", "终审日期"
        If e.NewValue <> Nothing AndAlso e.OldValue <> Nothing Then
            msgbox("已终审")
            e.cancel = True
        End If
    Case Else
        If e.DataRow.IsNull("审核日期") = False OrElse e.DataRow.IsNull("批准日期") = False OrElse e.DataRow.IsNull("终审日期") = False Then
            msgbox("不能修改")
            e.cancel = True
        End If
End Select


 回到顶部
总数 67 1 2 3 4 5 6 7 下一页