<%@ page language="C#" autoeventwireup="true" inherits="ims.web.cart, ims.web" trace="false" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="cart">
<head runat="server">
    <title>我的购物车</title><meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" OnAsyncPostBackError="AsyncError" />

        <asp:UpdatePanel ID="upCart" runat="server" OnPreRender="AddClientProcess" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:GridView ID="gvCart" runat="server"
        GridLines="None"
        AutoGenerateColumns="False"
        BorderWidth="0px"
        AllowPaging="True"
        PageSize="10"
        CssClass="normal"
        RowStyle-HorizontalAlign="center"
        FooterStyle-HorizontalAlign="center"
        OnDataBound="GvDataBound"
        OnPageIndexChanging="GvPageChanging"
        OnRowEditing="GvRowEditing"
        OnRowCancelingEdit="CancelEdit"
        OnRowDeleting="GvRowDeleting"
        OnRowUpdating="GvRowUpdating"
        OnRowDataBound="GvRowBound">
        <PagerTemplate>
            <div style="float:left;line-height:21px">
                <asp:LinkButton ID="lbFirst" runat="server" CommandArgument="First" CommandName="Page" Text="<<首页"></asp:LinkButton>&nbsp;
                <asp:LinkButton ID="lbPrev" runat="server" CommandArgument="Prev" CommandName="Page" Text="<上一页"></asp:LinkButton>&nbsp;
                <asp:LinkButton ID="lbNext" runat="server" CommandArgument="Next" CommandName="Page" Text="下一页>"></asp:LinkButton>&nbsp;
                <asp:LinkButton ID="lbLast" runat="server" CommandArgument="Last" CommandName="Page" Text="尾页>>"></asp:LinkButton>
            </div>
        </PagerTemplate>
            <FooterStyle HorizontalAlign="Center" />
            <RowStyle HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="商品" ItemStyle-CssClass="ov">
                    <HeaderStyle Width="120" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="缩略图" ItemStyle-CssClass="ov">
                    <HeaderStyle Width="102" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="单价" HeaderStyle-Width="76" />
                <asp:TemplateField HeaderText="数量" HeaderStyle-Width="45" />
                <asp:BoundField HeaderText="金额" HeaderStyle-Width="76" />
                <asp:TemplateField HeaderText="备 注">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" ShowDeleteButton="true" EditText="修改" HeaderText="操作" >
                    <HeaderStyle Width="60" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
        <div id="total" runat="server" class="total"></div>
        <div class="footBtnArea">
            <asp:Button ID="preSubmit" runat="server" Text="提交订单" CssClass="btn" OnClick="PreSubmit" />
            <asp:Button ID="clearCart" runat="server" Text="清空购物车" CssClass="btn" OnClientClick="return confirm('确定要清除购物车中所有项目吗？');" OnClick="ClearCart" />
        </div>
         </ContentTemplate>
         <Triggers>
            <asp:PostBackTrigger ControlID="clearCart" />
         </Triggers>
        </asp:UpdatePanel>
    <script src="js/comm.js"></script><script src="js/cart.js"></script>
    </form>
</body>
</html>