ShoppingCart.aspx

                      shoppingCard.aspx
的作用是告诉浏览器尽可能的拓宽一个cell,从而能在一行中完全显示一句话。滥用这个属性会使user陷于不停的横向scrolling中。
    铺天盖地都是table
    我觉得html代码 好乱阿
数据的显示使用的是DataGrid,(
, )

今天第一次看到了把

放在了table的后面
        // The Page_Load event on this page is used to load the
        // ShoppingCart DataGrid *the first time* the page is
        // accessed.
        //
        // Note that subsequent postbacks to the page *do not*
        // reload the Datagrid.  Instead, we rely on the control's
        // built-in viewstate management to rebuild the control
        // on the server.

我看到:在按下FinalCheckOut()以后,如果没有意外,发生Response.Redirect("Checkout.aspx");其实,CheckOut.aspx中间的数据并不是从shoppingCard.aspx传递过去的,只不过它们的数据都是从同一个数据库中间读取的。

PopulateShoppingCartList()是这个shoppingCard.aspx中间非常重要的一个函数,is used to populate a GridControl with the contents of the current user's shopping cart.

组合使用 UpdateShoppingCartDatabase();
            PopulateShoppingCartList();
首先,升级数据库,然后绑定数据库到DataGrid。

CheckoutBtn_Click()事件处理程序绑定了UpdateBtn_Click()的功能。

我发现在几乎在每一个函数中间,首先都是
            IBuySpy.ShoppingCartDB cart = new IBuySpy.ShoppingCartDB();
            // Obtain current user's shopping cart ID
            String cartId = cart.GetShoppingCartId();
我担心会不会每次都是不同的cart啊?用什么保证是同一个cart呢?
"ShoppingCartList" Stored Procedure: 在数据库中,ShoppingCart表保存了这个用户购买的items。 当用户把商品加入到购物车中时,程序就把这个商品加入到数据库中。为了表明哪个商品属于哪个购物车,程序把每一个商品加上一条“cart ID”信息。而“cart ID”是ShoppingCartDB创建的。The CartID either from the user's login name, or if the
user has not yet logged in, from a dynamically-generated GUID. The CartID is a
string which we use to identify the user currently logged in.

The ShoppingCartID value is either the User's Identity Name (if they are a registered and authenticated user),or a random GUID calculated for guest visitors or customers who have not yet logged in.
意思是:标志用户的就是ShoppingCartID???????????
response:   Yes!!!!!!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值