Added code to prevent adding user with duplicate UserID's
This commit is contained in:
parent
cb52bad3e9
commit
c68412fd81
@ -40,6 +40,11 @@ namespace VEPROMS
|
||||
MessageBox.Show("A blank UserID is an invalid UserID");
|
||||
return;
|
||||
}
|
||||
if (UserInfo.GetByUserID(_MyUser.UserID) != null)
|
||||
{
|
||||
MessageBox.Show(string.Format("A user already exists with the UserID '{0}'", _MyUser.UserID));
|
||||
return;
|
||||
}
|
||||
_MyUser.Save();
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user