Added code to prevent adding user with duplicate UserID's

This commit is contained in:
Rich 2015-02-18 03:24:36 +00:00
parent cb52bad3e9
commit c68412fd81

View File

@ -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;
}