コード例 #1
0
        public bool DoesUserExsist(User user)
        {
            User TestUser = user;
            LoginDBUtilitiesViewModel does_user_exsist = new LoginDBUtilitiesViewModel();

            does_user_exsist.GetUserByUsername(ref TestUser);
            if (TestUser.UserID != -1)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        public bool NewUser(string Username, string Password)
        {
            User user = new User(Username, Password);

            if (DoesUserExsist(user))
            {
                return(false);
            }

            LoginDBUtilitiesViewModel AddNewUser = new LoginDBUtilitiesViewModel();

            AddNewUser.AddUserDB(ref user);
            return(true);
        }
コード例 #3
0
        public bool AppLogin(string Username, string Password)
        {
            User user     = new User(Username, Password);
            User TestUser = new User(Username, "");
            LoginDBUtilitiesViewModel login = new LoginDBUtilitiesViewModel();

            login.GetUserByUsername(ref TestUser);
            if (TestUser.Password == user.Password)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }