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); }
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); }
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); }