static public string SelectUserType(string name, string pwd, string hash) { SqlDataAdapter adapterUserLog = new SqlDataAdapter("SELECT UserType FROM UserLog Where UserName = '******' AND MotDePasse = '" + Crypt_str.Encrypt_str(pwd, hash) + "'" , Connect.ConnectionString); DataTable dt = new DataTable(); adapterUserLog.Fill(dt); return(dt.Rows[0][0].ToString()); }
static public bool VerifyConnection(string name, string pwd, string hash) { SqlDataAdapter adapterUserLog = new SqlDataAdapter("SELECT COUNT(*) FROM UserLog Where UserName = '******' AND MotDePasse = '" + Crypt_str.Encrypt_str(pwd, hash) + "'" , Connect.ConnectionString); DataTable dt = new DataTable(); adapterUserLog.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { return(true); } else { return(false); } }