Esempio n. 1
0
 public static bool deleteUser(string uid)
 {
     if (isExistUser(uid) == true)
     {
         AccessDB.ExecSQL("DELETE FROM UserInfo WHERE UserID='" + uid + "'");
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 public static bool newUser(string uid, string pwd, string userAdmin, string readerAdmin, string bookAdmin, string borrowAdmin, string regTime)
 {
     if (isExistUser(uid) == false)
     {
         string sql;
         sql  = "INSERT INTO UserInfo(UserID,UserPWD,UserAdmin,ReaderAdmin,BookAdmin,BorrowAdmin,RegisterTime)";
         sql += "Values('" + uid + "','" + pwd + "','" + userAdmin + "','" + readerAdmin + "','" + bookAdmin + "','" + borrowAdmin + "','" + regTime + "')";
         AccessDB.ExecSQL(sql);
         return(true);
     }
     return(false);
 }
Esempio n. 3
0
 public static bool modifyUser(string uid, string pwd, string userAdmin, string readerAdmin, string bookAdmin, string borrowAdmin)
 {
     if (isExistUser(uid) == true)
     {
         string sql;
         sql  = "UPDATE UserInfo SET UserPWD='" + pwd + "',UserAdmin='" + userAdmin + "',ReaderAdmin='" + readerAdmin;
         sql += "',BookAdmin='" + bookAdmin + "',BorrowAdmin='" + borrowAdmin + "' WHERE UserID='" + uid + "'";
         AccessDB.ExecSQL(sql);
         return(true);
     }
     return(false);
 }