If e.Row("性别") = "男" AndAlso User.IsRole("女") Then
e.cancel = True
Messagebox.Show("只有男生宿舍管理员才能修改男生的信息!","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf e.Row("性别") = "女" AndAlso User.IsRole("男") Then
e.cancel = True
Messagebox.Show("只有女生宿舍管理员才能修改女生的信息!","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
当给用户给“男”,或“女 ”角色时没问题,为什么当给用户不给任何角色的时候却也能编辑,
[此贴子已经被作者于2020/6/8 16:33:13编辑过]