<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Shoppingcart.aspx.cs" Inherits="Shoppingcart" %>
<%@ Register Src="WebControl/Top.ascx" TagName="Top" TagPrefix="uc1" %>
<%@ Register Src="WebControl/Foot.ascx" TagName="Foot" TagPrefix="uc2" %>
<%@ Register Src="WebControl/Left.ascx" TagName="Left" TagPrefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>购物车-B2C电子商务网站</title>
<meta name="keywords" content="网上鞋店，手机数码，护肤品，..." />
<meta name="description" content="BtoC购物网站为您提供最实惠的商品..." />

<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

<script type="text/javascript">
        //我要购买
        function select_adress() {
            var b = window.confirm("您没登录，请先登录？");
            if (b) {
                opendiv('m', 400, 200);
            }

        }
</script>

</head>

<body>

<form runat="server" id="form2">
<center>

<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
    <uc1:Top runat="server" ID="uctop" />
    
    <div id="templatemo_main">
    	<uc3:Left runat="server" ID="ucLeft" />
    	
        <div id="content" class="float_r">
        	<h3>购物车</h3>
        	<table width="680px" cellspacing="0" cellpadding="5">
                   	  <tr bgcolor="#ddd">
                        	<th width="120" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">商品图片 </th> 
                        	<th width="180" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">商品名称 </th>
                        	<th width="130" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">商品编码 </th>
                       	  	<th width="100" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">数量 </th> 
                        	<th width="60" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">单价 </th> 
                        	<th width="60" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;">总金额 </th> 
                        	<th width="90" align="left" nowrap="nowrap" style="border-right:1px #ccc solid;"> 操作</th>
                            
                      </tr>
                      
                      <asp:Repeater ID="rptShopPingCar" runat="server" OnItemCommand="rptShopPingCar_OnItemCommand" >
				         <ItemTemplate>
                    	    <tr>
                        	    <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;"><a href='Productdetail.aspx?id=<%# Eval("ProductId") %>'><img src='Admin/Upfile/<%# Eval("ProductPic") %>' alt="Shoes 1" style="width:100px;"/></a></td> 
                        	    <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;"><%# Eval("ProductName") %></td> 
                                <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;"><%# Eval("ProductNo") %></td>                                
                                <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;" nowrap="nowrap">
                                    <asp:TextBox ID="txtProductNum" style="width: 20px; text-align: right" runat="server" ToolTip='<%# Eval("ProductNum") %>'
                                        Text='<%# Eval("ProductNum") %>'></asp:TextBox>
                                    <asp:Button ID="LinkButton1" CommandName="update" CommandArgument='<%# Eval("ProductNewID") %>'
                                        Text="修改" runat="server" Style="cursor: hand; padding-top:5px"></asp:Button>
                                </td>
                                <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;"">￥<%# Convert.ToDecimal(Eval("WebsitePrice")).ToString("00.00")%> </td> 
                                <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;">￥<%# Convert.ToDecimal(Eval("ProductTotal")).ToString("00.00")%> </td>
                                <td align="left" style="border-bottom:1px #ccc solid; border-right:1px #ccc solid;"> <asp:LinkButton Text="删除" runat="server" ID="linkbtnDelete" CommandName="Del" style="cursor:hand;" CommandArgument='<%# Eval("ProductNewID") %>' OnClientClick="javascript:return confirm('您确实要删除吗！')" /></td>
						    </tr>
						 </ItemTemplate>
			          </asp:Repeater>

                        <tr>
                        	
                            <td align="left" style="background:#ddd; font-weight:bold" colspan="3">
                              商品总金额：<asp:Literal ID="litSunMoney" runat="server" Text='0.00￥'></asp:Literal>
                            </td>
                         
                            <td align="right" style="background:#ddd; font-weight:bold" colspan="4">
                               <a href="Shoppingcart.aspx?flag=Clear" >清空购物车</a>
                                &nbsp;
                               <a href="Index.aspx" >接着去购物</a>  
                                &nbsp;     
                               <a href="javascript:history.back()">返回</a>   
                                &nbsp;                       
                               <asp:Button ID="btnBuy" runat="server" Text="现在结账" onclick="btnBuy_Click" style="cursor:hand;" />
                             
                             </td>
						</tr>
					</table>
			            
			</div>

        <div class="cleaner"></div>
    </div> <!-- END of templatemo_main -->
    
    <uc2:Foot runat="server" ID="ucFoot" />
</div> <!-- END of templatemo_wrapper -->
</div> <!-- END of templatemo_body_wrapper -->

</center>

</form>
</body>
</html>
