If e.DataCol.Name = "优先等级" Then
if e.DataRow.isnull("优先等级")=false andalso e.DataRow.isnull("当前设计师") =false
Dim dr As DataRow
dr = e.DataTable.SQLFind("优先等级 = '" & e.NewValue & "' And 当前设计师 = '" & e.DataRow("当前设计师") & "' and _identify <> " & e.DataRow("_identify") )
If dr IsNot Nothing Then
MessageBox.Show("同一设计师无法设置两个相同的优先级别")
e.Cancel = True
else
dr = e.DataTable.Find("优先等级 = '" & e.NewValue & "' And 当前设计师 = '" & e.DataRow("当前设计师") & "' and _identify <> " & e.DataRow("_identify") )
If dr IsNot Nothing Then
MessageBox.Show("同一设计师无法设置两个相同的优先级别")
e.Cancel = True
End If
End If
end if
End If