Ejemplo n.º 1
0
        public static bool login(string uid, string pwd)
        {
            DataTable dt = db.Get_DataTable("SELECT MemberID,Tel,Email FROM " + com.tablePrefix + "Member WHERE UserName='******' AND pwd='" + pwd + "'");
            if (dt.Rows.Count > 0)
            {
                myMember user = new myMember();
                user.username = uid;
                user.tel = dt.Rows[0]["Tel"].ToString();
                user.email = dt.Rows[0]["Email"].ToString();
                HttpContext.Current.Session["user"] = user;
                //记录日志

                return true;

            }
            else
                return false;
        }
Ejemplo n.º 2
0
        public static bool login(string uid, string pwd)
        {
            DataTable dt = db.Get_DataTable("SELECT MemberID,Tel,Email FROM " + com.tablePrefix + "Member WHERE UserName='******' AND pwd='" + pwd + "'");

            if (dt.Rows.Count > 0)
            {
                myMember user = new myMember();
                user.username = uid;
                user.tel      = dt.Rows[0]["Tel"].ToString();
                user.email    = dt.Rows[0]["Email"].ToString();
                HttpContext.Current.Session["user"] = user;
                //记录日志

                return(true);
            }
            else
            {
                return(false);
            }
        }