private Boolean IsAccountValid(string name, string pwd) { Boolean result = false; if (Properties.Settings.Default.user.Equals(name) && Properties.Settings.Default.pwd.Equals(pwd)) { return(true); } try { SqlLiteHelper sqlLiteHelper = SqlLiteHelper.GetInstance(); string query = "select * from account where 账号=" + "'" + name + "'" + " and 密码=" + "'" + pwd + "'"; SQLiteDataReader dataReader = sqlLiteHelper.ExecuteQuery(query); if (dataReader.HasRows) { result = true; } } catch (Exception e) { Console.WriteLine(e.Message); } return(result); }