public static string getPassword(string uid) { if (isExistUser(uid) == true) { return(AccessDB.GetFieldValue("SELECT UserPWD FROM UserInfo WHERE UserID = '" + uid + "'")); } return(""); }
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); }
public static bool isExistUser(string uid) { string cnt = AccessDB.GetFieldValue("SELECT count(*) FROM UserInfo WHERE UserID = '" + uid + "'"); if (cnt == "1") { return(true); } return(false); }
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); }