Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
            }
        }
Exemple #5
0
        public bool hasUser(string username)
        {
            IDBUtil dBUtil = DBUtilFactory.getDBUtil("DBUtilImpl");
            User    user   = dBUtil.getUser(username);

            if (user == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Exemple #6
0
        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);
            }
        }
Exemple #7
0
        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));
        }