Dim exp As String = "编辑者 Is Null And [_Identify] = " & e.Row("_Identify")
cmd.C
cmd.CommandText = "Update {客户订单} Set 编辑者 = '" & User.Name & "' Where " & exp
If cmd.ExecuteNonQuery = 1 Then
e.Row("编辑者") = User.Name
Else
cmd.CommandText = "Select 编辑者 From {客户订单} Where [_Identify] = " & e.Row("_Identify")
Dim nm As String = cmd.ExecuteScalar
If nm > "" Then
MessageBox.show(nm & "正在编辑此行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
MessageBox.show("此行可能已经被删除,无法编辑!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
e.Cancel = True '取消编辑
End If

此主题相关图片如下:捕获.png
[此贴子已经被作者于2014-5-14 21:26:20编辑过]