Пример #1
0
        public IActionResult Cart_Submit()
        {
            //AJAX就先检测一遍,未登录则弹窗
            B_Cart.UpdateUidByCartID(CartCookID, mu, false);
            string ids = GetParam("prochk");

            return(Redirect("GetOrderInfo?ids=" + ids + "&ProClass=" + ProClass));//"#none"
        }
Пример #2
0
        //结算,到订单页再生成AllMoney
        protected void NextStep_Click(object sender, EventArgs e)
        {
            //AJAX就先检测一遍,未登录则弹窗
            B_User.CheckIsLogged(Request.RawUrl);
            M_UserInfo mu = buser.GetLogin();//提交前同步一次,避免即时登录造成的cart中id未与用户关联

            B_Cart.UpdateUidByCartID(CartCookID, mu);
            string ids = Request.Form["prochk"];

            Response.Redirect("/Extend/Mobile/GetOrderInfo.aspx?ids=" + ids + "&ProClass=" + ProClass);//"#none"
        }
Пример #3
0
        private void MyBind()
        {
            M_UserInfo mu = buser.GetLogin();

            B_Cart.UpdateUidByCartID(CartCookID, mu);
            CartDT = cartBll.SelByCartID(CartCookID, mu.UserID, ProClass);//从数据库中获取
            CartDT.DefaultView.RowFilter = "StoreID=" + StoreID;
            CartDT         = CartDT.DefaultView.ToTable();
            RPT.DataSource = orderCom.SelStoreDT(CartDT);
            RPT.DataBind();
            totalmoney.InnerText = TotalPrice.ToString("f2");
        }
Пример #4
0
        public IActionResult Cart()
        {
            if (!mu.IsNull && mu.Status != 0)
            {
                return(WriteErr("你的帐户未通过验证或被锁定"));
            }
            int proid = DataConvert.CLng(GetParam("id"));

            if (proid < 1)
            {
                proid = DataConvert.CLng(GetParam("proid"));
            }
            //int suitid = DataConvert.CLng(GetParam("suitid"));
            int pronum = DataConvert.CLng(GetParam("pronum"), 1);
            int pclass = -1;//非-1则为添加了商品,需要跳转

            if (proid > 0)
            {
                M_Product proMod = proBll.GetproductByid(proid);
                if (proMod == null)
                {
                    return(WriteErr("商品不存在"));
                }
                AddToCart(mu, proMod, pronum);
                pclass = proMod.ProClass;
            }
            if (Request.IsAjaxRequest())
            {
                return(Content(Success.ToString()));
            }                                                                   //ajax下不需要数据绑定与跳转
            //通过页面访问
            if (pclass > -1)
            {
                Response.Redirect("Cart?ProClass=" + pclass);
            }
            B_Cart.UpdateUidByCartID(CartCookID, mu);
            VM_Cart model = new VM_Cart(HttpContext, mu);

            model.CartDT = cartBll.SelByCartID(CartCookID, mu.UserID, ProClass); //从数据库中获取
            if (StoreID != -100)                                                 //仅显示指定商铺的商品
            {
                model.CartDT.DefaultView.RowFilter = "StoreID=" + StoreID;
                model.CartDT = model.CartDT.DefaultView.ToTable();
            }
            model.StoreDT = orderCom.SelStoreDT(model.CartDT);
            //totalmoney.InnerText = TotalPrice.ToString("f2");
            return(View(model));
        }