Beispiel #1
0
 public static bool checkPrimaryKey(string sql)
 {
     if (String.IsNullOrEmpty(MyConnect.getString(sql)))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
        public static bool checkUserName(string username)
        {
            if (String.IsNullOrEmpty(username))
            {
                return(false);
            }
            string sql = "select UserName from LogIn where UserName=N'" + username + "'";

            if (String.IsNullOrEmpty(MyConnect.getString(sql)))
            {
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        public static bool checkPassword(string username, string password)
        {
            string sql1 = "select Password from LogIn where UserName=N'" + username + "'";
            string key  = ReadXML.GetString("MyResource.xml", "setting/KeyCrypt");
            string s    = StringPassword.DecrytString(MyConnect.getString(sql1), key);

            if (String.IsNullOrEmpty(s))
            {
                return(false);
            }
            if (s.Equals(password))
            {
                return(true);
            }
            return(false);
        }