Beispiel #1
0
 public static string getPassword(string uid)
 {
     if (isExistUser(uid) == true)
     {
         return(AccessDB.GetFieldValue("SELECT UserPWD FROM UserInfo WHERE UserID = '" + uid + "'"));
     }
     return("");
 }
Beispiel #2
0
 public static Boolean getBorrowAdmin(string uid)
 {
     if (isExistUser(uid) == true)
     {
         string qx = AccessDB.GetFieldValue("SELECT BorrowAdmin FROM UserInfo WHERE UserID = '" + uid + "'");
         return(Convert.ToBoolean(qx));
     }
     return(false);
 }
Beispiel #3
0
        public static bool isExistUser(string uid)
        {
            string cnt = AccessDB.GetFieldValue("SELECT count(*) FROM UserInfo WHERE UserID = '" + uid + "'");

            if (cnt == "1")
            {
                return(true);
            }
            return(false);
        }
Beispiel #4
0
        public static Boolean IsBorrowAdmin;        //是否拥有借阅权限

        public static bool judgeUser(string uid, string pwd)
        {
            string sql;

            sql = "SELECT count(*) FROM UserInfo WHERE UserID='" + uid + "' and UserPWD='" + pwd + "'";
            string cnt = AccessDB.GetFieldValue(sql);

            if (cnt == "1")
            {
                return(true);
            }
            return(false);
        }