public void modifyUserPerLevel(string username, int perLevel) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); user.PerLevel = perLevel; dBUtil.modifyUser(username, 5, user); }
public void modifyUserPassword(string username, string pwd) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); user.Pwd = pwd; dBUtil.modifyUser(username, 2, user); }
public int getMapid(string name) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User u1 = dBUtil.getUser(name); Map m2 = dBUtil.getMap(u1.Mapid); if (m2 == null) { return(-1); } return(m2.Id); }
public bool verifyUser(string username, string email) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); if (user.Email == email) { return(true); } else { return(false); } }
public bool hasUser(string username) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); if (user == null) { return(false); } else { return(true); } }
public bool isLogin(string username, string pwd) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); if (pwd != user.Pwd) { return(false); } else { return(true); } }
public int getPerLevel(string username) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); User user = dBUtil.getUser(username); if (user == null) { return(-1); } else { return(user.PerLevel); } }
public User queryUser(string username) { IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl"); return(dBUtil.getUser(username)); }