Select Case e.DataCol.Name
Case "姓名" , "身份证号"
If e.NewValue IsNot Nothing Then '如果已经输入订单号
Dim dr As DataRow = e.DataTable.find(e.datacol.name & " = '" & e.NewValue & "'")
If dr IsNot Nothing Then
MessageBox.Show(e.datacol.name & "已存在!请加入备注.","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.cancel = True
End If
End If
End Select