예제 #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType  = "text/plain";
            context.Response.CacheControl = "no-cache";

            int    userID = Fn.IsInt(Req.GetSession(LoginInfo.C_UserID), 0);
            string cou    = "0";

            if (userID > 0)
            {
                cou = User_Cart.GetUserCartN(userID).ToString();
            }

            context.Response.Write(cou);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IMessage msgAjax = new MessageAjaxC();
            int      userID  = Fn.IsInt(Req.GetSession(LoginInfo.C_UserID), 0);

            if (userID > 0)
            {
                cou = User_Cart.GetUserCartN(userID).ToString();

                Dictionary <int, DataTable> dict = User_Cart.List(userID, LoginInfo.UserLevel, LoginInfo.UserIdentity);
                dtPro      = dict[10];
                totalPrice = double.Parse(dict[0].Rows[0]["TotalPrice"].ToString());
            }

            msgAjax.AddMessage("cou", cou);
            msgAjax.AddMessage("html", Fn.GetControlHtml(this.cCart));
            Response.Write(msgAjax.ReturnMessage);
            Response.End();
        }