public void EditPassword(UserRegistration user)
        {
            UserDataHandler  udh  = new UserDataHandler();
            UserRegistration temp = userList.Single(x => x.name == user.name);

            temp.password = user.password;
            DeleteUser(user);
            AddUser(temp);
        }
        public void EditUser(UserRegistration user)
        {
            UserDataHandler  udh  = new UserDataHandler();
            UserRegistration temp = userList.Single(x => x.regnumber == user.regnumber);

            temp = user;
            DeleteUser(user);
            AddUser(temp);
        }
        public bool DeleteUser(UserRegistration user)
        {
            UserDataHandler udh = new UserDataHandler();

            bool result = false;

            if (userList.Any(x => x.regnumber == user.regnumber))
            {
                userList.Remove(user);
                result = true;
            }

            return(result);
        }