Esempio n. 1
0
        public static int getID(string uid)
        {
            m_UserContext db1 = new m_UserContext();

            foreach (var t in db1.m_Users)
            {
                if (t.loginid == uid)
                {
                    return(t.ID);
                }
            }
            return(-1);
        }
Esempio n. 2
0
        public static m_User getUserPac(string username)
        {
            m_UserContext db1 = new m_UserContext();

            foreach (var t in db1.m_Users)
            {
                if (t.name == username)
                {
                    return(t);
                }
            }
            return(null);
        }
Esempio n. 3
0
        public static bool Vertify(string uid, string pw)
        {
            m_UserContext db1 = new m_UserContext();
            string        pws = Helper.AESHelper.Encrypt(pw);

            foreach (var t in db1.m_Users)
            {
                if (t.loginid == uid & t.password == pws)
                {
                    return(true);
                }
            }
            return(false);
        }