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