Esempio n. 1
0
        public bool  CheckIfUserExsit(string userName)
        {
            if (userList != null)
            {
                userList.Clear();
            }
            mockDB   = new MockDatabase();
            userList = mockDB.GetData();

            foreach (var user in userList)
            {
                if (user.UserID == userName)
                {
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 2
0
        public bool FindUser(string userName)
        {
            if (userList != null)
            {
                userList.Clear();
            }

            mockDB   = new MockDatabase();
            userList = mockDB.GetData();

            foreach (var user in userList)
            {
                if (user.UserID == userName)
                {
                    hiddenPass = user.Password;
                    return(true);
                }
            }
            return(false);
        }