public static SecureDA getInstance() { if (instance == null) { instance = new SecureDA(); } return(instance); }
/// <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); }
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); } }
public bool update() //update to database using secure Data Acess { return(SecureDA.getInstance().updateToDatabase(this)); }
public bool create() // add to database using secure Data Acess { return(SecureDA.getInstance().addToDatabase(this)); }