protected void btnDelete_Click(object sender, EventArgs e) { var userId = GetUserId(); bool userInUse = ServiceFactory.UserService.InUse(userId); if (userInUse) { DisplayCannotDeleteUserLabel("This user cannot be deleted because it's in use as a judge or timekeeper. You must remove the user as a judge or timekeeper from all contests before it can be deleted."); return; } accountUtil.DeleteUser(userId); GoToUsersPage(); }