Exemplo n.º 1
0
        //数据绑定
        public void bind()
        {
            int customerID = Convert.ToInt32(Session["userid"]);

            cart = new cartBLL(customerID);
            GridView1.DataSource = cart.showCartInfo();
            GridView1.DataBind();
        }
Exemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int ID = int.Parse(Request.QueryString["id"].ToString());
            bookShop.DAL.Book b = new bookShop.DAL.Book();
            b.bookID = ID;
            b.bookAmount = int.Parse(amountLabel.Text);
            cartBLL cb = new cartBLL();
            cb.addBookToCart(b, Convert.ToInt32(Session["userid"]), 1);

        }