Пример #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);
            }
        }
Пример #3
0
 public bool update()  //update to database using secure Data Acess
 {
     return(SecureDA.getInstance().updateToDatabase(this));
 }
Пример #4
0
 public bool create()  // add to database using secure Data Acess
 {
     return(SecureDA.getInstance().addToDatabase(this));
 }