<%@ page language="C#" autoeventwireup="true" inherits="_ShoppingCart, mallz" viewstateencryptionmode="Never" enableviewstatemac="false" validaterequest="false" enableEventValidation="false" %>

<html xmlns="http://www.w3.org/1999/xhtml" runat="server" visible="false">
<head>
    <title></title>
    <script type="text/javascript" src="/Js/Index.js"></script>
    <script type="text/javascript" src="Js/Function.js"></script>
</head>
<body>
    <!-- 对应模板中的 {form1/} 标签 开始-->
    <form id="form1" runat="server">
    <div align="center"><br><IMG height=108 alt="" 
            src="images/guc_04.gif" width=202><IMG height=108 alt="" 
            src="images/guc_05-2.gif" width=81><IMG height=108 alt="" 
            src="images/guc_08.gif" width=14><IMG height=108 
            src="images/guc_07.gif" width=81><IMG height=108 alt="" 
            src="images/guc_08.gif" width=14><IMG height=108 
            src="images/guc_09.gif" width=119><IMG height=108 alt="" 
            src="images/guc_08.gif" width=14><IMG height=108 
            src="images/guc_11.gif" width=81><IMG height=108 alt="" 
            src="images/guc_08.gif" width=14><IMG height=108 
            src="images/guc_13.gif" width=81><IMG height=108 alt="" 
            src="images/guc_14.gif" width=39>
    </div>
    <br>    
    <div style="text-align:center" id="shopcarcontdiv" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
            <Columns>
                <asp:TemplateField>
                    <EditItemTemplate>
                        &nbsp;
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cb_select" runat="server" />
                        <asp:HiddenField ID="productID" runat="server" Value='<%# Eval("productID") %>' />
                    </ItemTemplate>
                    <HeaderTemplate>
                        <asp:CheckBox ID="cb_selectAll" runat="server" AutoPostBack="True" OnCheckedChanged="cb_selectAll_CheckedChanged" Text="全选" />
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="商品图片">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="18%" />
                    <ItemTemplate>
                        <a href="showProduct.aspx?productID=<%# Eval("productID") %>" target="_blank" >
                        <img onerror="this.src='/images/nopicture.gif'" onload="return ResizeImage(this,120px,120)" src='<%# Eval("productpic") %>' />
                        </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="productID" DataNavigateUrlFormatString="ShowProduct.aspx?productID={0}"
                    DataTextField="productName" HeaderText="商品名称">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:HyperLinkField>
                <asp:HyperLinkField DataNavigateUrlFields="shopID" DataNavigateUrlFormatString="/shop/{0}/"
                    DataTextField="shopName" HeaderText="所属店铺">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:HyperLinkField>
                <asp:TemplateField HeaderText="商品价格">
                    <EditItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("productPrice") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("productPrice") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="商品数量">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("buyproductNum") %>' Width="58px"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="txt_productNum" runat="server" Text='<%# Eval("buyproductNum") %>'
                            Width="58px"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="小结">
                    <EditItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("total") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("total") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
           <table style="width:98%">
           <tr>
           <th>
               <input id="Checkbox1" type="checkbox" />全选</th>
               <th>商品图片</th>
               <th>商品名称</th>
               <th>所属店铺</th>
               <th>商品价格</th>
               <th>商品数量</th>
               <th>小结</th>
           </tr>
           <tr>
           <td colspan="7" style="text-align:center">购物车内暂无商品</td>
           </tr>
           </table> 
            </EmptyDataTemplate>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
            </ContentTemplate>
           
        </asp:UpdatePanel>
    </div>
    <div style="margin:5px auto;text-align:center">
        <asp:Button ID="btn_delete" runat="server" Text="删除商品" OnClick="btn_delete_Click" />
        <asp:Button ID="btn_changeNum" runat="server" OnClick="btn_changeNum_Click" Text="修改数量" />
        <asp:Button ID="btn_buyagain" runat="server" Text="继续购物" OnClick="btn_buyagain_Click1" />
        <asp:Button ID="btn_next" runat="server" Text="下一步" OnClick="btn_next_Click1" /></div>
    </form>
    <!-- 对应模板中的 {form1/} 标签 结束-->
</body>
</html>
