コード例 #1
0
ファイル: cartCount.ashx.cs プロジェクト: yuhua1987113/scai
        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
ファイル: cart.aspx.cs プロジェクト: yuhua1987113/scai
        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();
        }