示例#1
0
        /// <summary>
        /// check availability of the user in database
        /// </summary>
        /// <returns>ture if user is available.</returns>
        private bool checkUser()
        {
            userSensitiveData = SecureDA.getInstance().readFromDatabase(this.username);


            if (!(userSensitiveData == null))
            {
                return(true);
            }

            return(false);
        }
示例#2
0
        private bool VerifyPassword(String Password)            // verify the current password retun true if ok else false
        {
            ModelUser = SecureDA.getInstance().readFromDatabase(frmMain.AppUser.UserName);

            if ((ModelUser.Password).Equals(Cryptography.Encrypt(Password)))
            {
                return(true);
            }
            else
            {
                MessageBox.Show("Wrong Password");
                return(false);
            }
        }