<%@ Control Language="C#"  EnableViewState="true"  %>
<%@ Import Namespace="ShopNum1.WebControl" %>
<%@ Import Namespace="ShopNum1.Common"%>
<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<!-- 商品列表 -->
  <div class="ProductCartTitle">商品列表信息</div>
  <div class="ProductCart">
<table width="100%" border="0" cellpadding="0" cellspacing="1">
    <tr class="ProductCartTr">
        <td>
            商品名称
        </td>
        <td>
            商品属性
        </td>
         <td>
            市场价
        </td>
        <td>
            本店价
        </td>
         <td>
            购买价格
        </td>
         <td>
            购买数量
        </td>
        <td>
            小计
        </td>
    </tr>

<asp:Repeater ID="RepeaterShopCart2" runat="server">
<ItemTemplate>
       <tr>
        <td width="140" align="center">
       
        <asp:HiddenField ID="HiddenFieldGuid" Value='<%# Eval("Guid")%>'  runat="server" />
         <asp:HiddenField ID="HiddenFieldProductGuid" Value='<%# Eval("ProductGuid")%>'  runat="server" />
           <a href='ProductDetail.aspx?guid=<%# Eval("ProductGuid") %>'   target="_blank"> 
                                    <asp:Image ID="ImageProduct" runat="server" Height="100px" 
                  ImageUrl= '<%# Globals.ImagePath+"s_"+Eval("OriginalImge") %>'
                    Width="100px" />
                                     </a><br /><%# Eval("Name")%> 
                                     </td>
        <td>
             <%# Eval("Attributes")%></td>
         <td>
               <%# Globals.MoneySymbol%> <asp:Label ID="labelMarketPrice" runat="server" Text=' <%# Eval("MarketPrice")%>' />
        </td>
        <td>
             <%# Globals.MoneySymbol%><%# Eval("ShopPrice")%></td>
          <td align="right">
            <%# Globals.MoneySymbol%>  <asp:Label ID="labelBuyPrice" runat="server" Text=' <%# Eval("BuyPrice")%>' />
        </td>
         <td align="right">
         <asp:Label  ID="labelBuyNumber" runat="server" Text='<%# Eval("BuyNumber")%>' />
        </td>
        <td align="right">
          <%# Globals.MoneySymbol%> <asp:Label ID="labelAll" runat="server" />       
        </td> 
    </tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="GoRturn">
购物金额小计为：<font class="StorePrice"><%# Globals.MoneySymbol%><asp:Label ID="labelAllPrice" runat="server" /></font> 
比市场价：<font class="Price"><%# Globals.MoneySymbol%><asp:Label ID="labelMaretPrice" runat="server" /></font> 
节省了：<font class="StorePrice"><%# Globals.MoneySymbol%><asp:Label ID="labelLower" runat="server" /></font> 
</div>
    
  </div>
  <div class="ProductCartDown"></div>
<div class="warp">
  <div class="ProductCartTitle">优惠活动</div>
  <div class="ProductCart">
<table width="100%" border="0" cellspacing="1" cellpadding="0" style="text-align:center;line-height:150%;background-color:#e1e1e1" >
  <tr style="font-weight:bold;line-height:200%">

    <td  width="10%">活动名称</td>
    <td width="12%">开始时间</td>
    <td width="12%">结束时间</td>
    <td>需要会员等级</td>
    <td width="9%">优惠方式</td>
    <td width="10%">优惠范围</td>
    <td>活动描述</td>
  </tr>
  <!-- 买几送几(BuyAndGive_Operate)  -->
  <asp:Repeater ID="RepeaterFullAttentionPromotion" runat="server" >
<%-- <HeaderTemplate>       
</HeaderTemplate>--%><ItemTemplate>
  <tr>
 
    <td width="10%"><%# Eval("Name")%></td>
    <td><%# Eval("StartTime")%></td>
    <td><%# Eval("EndTime")%></td>
    <td><%# CanAttentionPromotion.ChangeMemberRankBuyAndGive(Eval("Guid").ToString())%></td>
    <td >  <%# CanAttentionPromotion.ChangePromotionType(Eval("PromotionType").ToString())%></td>
    <td><%# CanAttentionPromotion.ChangeSalesPromotionProduct(Eval("Guid").ToString())%></td>
    <td><%# Eval("Description")%></td>
  </tr>
   </ItemTemplate>
</asp:Repeater>
</table>
  </div>
  <div class="ProductCartDown"></div>
</div>

<!-- 收货地址 -->
  <div class="ProductCartTitle">收货人信息</div>
  <div class="ProductCart">
  
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
    <tr class="ProductCartTr">
        <td colspan="4" align="left">
                     <asp:DropDownList ID="DropDownListSelect" runat="server" AutoPostBack="True" Width="250">
                    </asp:DropDownList>
                    </td>
    </tr>
    <tr class="ProductCartTr">
        <td width="10%">
            收货人姓名：</td>
        <td>
                    <asp:TextBox ID="TextBoxName" runat="server"></asp:TextBox>
                        </td>
        <td>
            电子邮件（EMAIL）：</td>
             <td>
                    <asp:TextBox ID="TextBoxEmail" runat="server"></asp:TextBox>
                        </td>
    </tr>
    <tr class="ProductCartTr">
        <td>
            详细收货地址：</td>
        <td>
                    <asp:TextBox ID="TextBoxAddress" runat="server"></asp:TextBox>
                        </td>
        <td>
            邮政编码：</td>
             <td>
                    <asp:TextBox ID="TextBoxPostalcode" runat="server"></asp:TextBox>
                        </td>
    </tr>
    <tr class="ProductCartTr">
        <td>
            电话号码：</td>
        <td>
           <asp:TextBox ID="TextBoxTel" runat="server"></asp:TextBox></td>
        <td>
            手机号码：</td>
             <td>
            <asp:TextBox ID="TextBoxMobile" runat="server"></asp:TextBox></td>
    </tr>
</table>
  </div>
  <div class="ProductCartDown"></div>
<!-- 配送方式 -->
   <asp:HiddenField ID="HiddenFieldSelectDispatch" Value="0" runat="server" />
  <div class="ProductCartTitle">选择配送地区（只能选一种）</div>
  <div class="ProductCart">
  
    <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
    <tr><td colspan="6"><asp:DropDownList ID="DropDownListDispatchRegion" runat="server" AutoPostBack="True" EnableViewState="true" Width="250"/></td></tr>
      <tr class="ProductCartTr">
      <td width="10%"></td>
        <td >配送方式名称</td>
        <td >配送方式描述</td>
        <td >配送方式费用</td>
        <td >保价费用</td>
        <td >配送费用计算公式</td>
      </tr>
      <asp:Repeater ID="RepeaterShoppingCartDispatch" runat="server">
<ItemTemplate>
     <tr>
        <td  align="center"> <asp:HiddenField ID="HiddenFieldGuid" Value='<%# Eval("Guid")%>'  runat="server" />
         <asp:checkbox id="checkboxAll" runat="server" /><span runat="server" visible="false" id="guid"><%# Eval("Guid") %></span></td>
         <td> 
         <asp:Label ID="labelName" runat="server" Text=' <%# Eval("Name")%>' /></td>
        <td><asp:Label ID="labelRemark" runat="server" Text=' <%# Eval("Remark")%>' /></td>
        <td> <%# Globals.MoneySymbol%><asp:Label ID="LabelDispatchPrice" runat="server" /></td>
        <td ><%# Globals.MoneySymbol%><asp:Label ID="LabelSafeCost" runat="server" Text ='<%# Eval("SafeCost")%>' />
         <td>
         <asp:Label ID="LabelFormula" runat="server" Text ='<%# Eval("Formula")%>' />
        </td>
      </tr>
</ItemTemplate>
</asp:Repeater>
    </table>
    
    <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
      <tr>
        <td align="right">&nbsp;</td>
      </tr>
    </table>
  </div>
  <div class="ProductCartDown"></div>

<!-- 支付方式 -->

  <div class="ProductCartTitle">选择支付方式（只能选择一种）</div>
  <div class="ProductCart">
  
    <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
      <tr class="ProductCartTr">
      <td width="10%"></td>
        <td  width="120">支付方式名称</td>
        <td>描述</td>
        <td width="100">手续费</td>
       <td style="display:none">是否按百分比计算</td>
      <asp:Repeater ID="RepeaterShoppingCartPayment" runat="server">
<ItemTemplate>
     <tr>
         <td  align="center"> <asp:HiddenField ID="HiddenFieldGuid" Value='<%# Eval("Guid")%>'  runat="server" />
         <asp:checkbox id="checkboxAll" runat="server" /><span runat="server" visible="false" id="guid"><%# DataBinder.Eval(Container.DataItem, "Guid") %></span></td>
         <td><asp:Label ID="LabelName" runat="server" Text ='<%# Eval("Name")%>' /></td>
        <td><%# Eval("Memo")%></td>
        <td align="right" ><asp:Label ID="LabelCharge" runat="server" Text ='<%# Eval("Charge")%>' /></td>
        <td style="display:none"><asp:HiddenField ID="HiddenFieldIsPersent" runat="server" Value='<%# Eval("IsPercent")%>' /></td>
      </tr>
   
</ItemTemplate>
</asp:Repeater>
    </table>
    
    <table width="100%" cellspacing="1" border="0" cellpadding="0" >
      <tr>
        <td align="right">&nbsp;</td>
      </tr>
    </table>
  </div>
  <div class="ProductCartDown"></div>

<!-- 商品包装 -->

  <div class="ProductCartTitle">选择包装方式（只能选择一种）</div>
  <div class="ProductCart">
  
    <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
      <tr class="ProductCartTr">
      <td></td>
        <td width="120">包装名称</td>
        <td >包装费</td>
        <td >免费额度</td>
        <td width="100">包装图片</td>
      </tr>
      <asp:Repeater ID="RepeaterShoppingCartPack" runat="server">
<ItemTemplate>
     <tr>
         <td width="10%" align="center"> <asp:HiddenField ID="HiddenFieldGuid" Value='<%# Eval("Guid")%>'  runat="server" />
         <asp:checkbox id="checkboxAll" runat="server" /><span runat="server" visible="false" id="guid"><%# DataBinder.Eval(Container.DataItem, "Guid") %></span></td>
         
        <td><asp:Label ID="LabelName" runat="server" Text ='<%# Eval("Name")%>' /></td>
        <td> <%# Globals.MoneySymbol%> <asp:Label ID="LabelCost" runat="server" Text ='<%# Eval("Cost")%>' /></td>
        <td > <%# Globals.MoneySymbol%> <asp:Label ID="LabelFreeLimit" runat="server" Text ='<%# Eval("FreeLimit")%>' /></td>
        <td align="right"> <a href='PackImage.aspx?image=<%# Eval("PackImagePath") %>'   target="_blank">查看</a></td>
      </tr>
     
</ItemTemplate>
</asp:Repeater>
    </table>
  </div>
  <div class="ProductCartDown"></div>

<!-- 祝福贺卡 -->

  <div class="ProductCartTitle">选择精美贺卡（只能选择一种）</div>
  <div class="ProductCart">
  
    <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
      <tr class="ProductCartTr">
      <td width="10%" ></td>
        <td widht="120">贺卡名称</td>
        <td>贺卡费用</td>
        <td >免费额度</td>
        <td width="100" align="center">贺卡图片</td>
      </tr>
      <asp:Repeater ID="RepeaterShoppingCartBlessCard" runat="server">
<ItemTemplate>
     <tr>
         <td align="center"> 
         <asp:checkbox id="checkboxAll" runat="server" /><span runat="server" visible="false" id="guid"><%# DataBinder.Eval(Container.DataItem, "Guid") %></span><asp:HiddenField ID="HiddenFieldGuid" Value='<%# Eval("Guid")%>'  runat="server" /></td>
         <td > <asp:Label ID="LabelName" runat="server" Text ='<%# Eval("Name")%>' /></td>
        <td> <%# Globals.MoneySymbol%> <asp:Label ID="LabelCost" runat="server" Text ='<%# Eval("Cost")%>' /></td>
        <td > <%# Globals.MoneySymbol%> <asp:Label ID="LabelFreeLimit" runat="server" Text ='<%# Eval("FreeLimit")%>' /></td>
        <td  align="right"> <a href='BlessCardImage.aspx?image=<%# Eval("CardImagePath") %>'   target="_blank">查看</a></td>
      </tr>
</ItemTemplate>
</asp:Repeater>

<tr>
<td align="center" >祝福卡贺语：</td>
<td colspan="4" style="padding:10px"><asp:TextBox ID="TextBoxBlessCardContent" runat="server" 
                TextMode="MultiLine" Height="60px" Width="440px"></asp:TextBox>
                </td></tr>
    </table>
  </div>
  <div class="ProductCartDown"></div>

<!-- 其它信息 -->

  <div class="ProductCartTitle">其它购物信息</div>
  <div class="ProductCart" style="text-align:center">
  
      <table width="100%" cellspacing="1" border="0" cellpadding="0"  >
      <tr>
        <td  width="10%" >
            发票类型：
        </td>
        <td align="right"><asp:DropDownList ID="DropDownListInvoiceType" runat="server" Width="250">
                                        </asp:DropDownList></td>
      </tr>
      <tr>
        <td  >
            发票抬头：
        </td>
        <td align="right"><asp:TextBox ID="TextBoxInvoiceTitle" runat="server" Width="250"></asp:TextBox></td>
      </tr>
      <tr>
        <td  >
            发票内容：
        </td>
        <td align="right"><asp:TextBox ID="TextBoxInvoiceContent" runat="server" Width="250" ></asp:TextBox></td>
      </tr>
      <tr>
        <td >
            给商家的留言：
        </td>
        <td align="right"><asp:TextBox ID="TextBoxClientToSellerMsg" runat="server" TextMode="MultiLine" Width="440" Height="60"></asp:TextBox></td>
      </tr>
      <tr>
        <td >
            缺货处理：
        </td>
        <td align="right"><asp:TextBox ID="TextBoxOutOfStockOperate" runat="server" Width="250"></asp:TextBox></td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;
            </td>
      </tr>
      <!-- 费用信息 -->
      <tr>
         <td align="left" colspan="2" >    
                      商品总金额：
                      
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelProductPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    -折扣：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelDiscountValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +发票税额：
                    <%# Globals.MoneySymbol%>  <asp:Label ID="LabelInvoiceTaxValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +配送费用：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelDispatchPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +保价费用：
                    <%# Globals.MoneySymbol%>  <asp:Label ID="LabelInsurePriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +支付费用：
                    <%# Globals.MoneySymbol%>  <asp:Label ID="LabelPaymentPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +包装费用：
                    <%# Globals.MoneySymbol%>  <asp:Label ID="LabelPackPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    +贺卡费用：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelBlessCardPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    =订单总金额：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelOrderPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                </td>
      </tr>
      <tr>
        <td colspan="2">
                    -已付款金额：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelAlreadPayPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    -使用佘额：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelSurplusPriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
                    -使用积分(积分抵用的金额)：
                     <%# Globals.MoneySymbol%> <asp:Label ID="LabelScorePriceValue" runat="server" Text="0.00" ForeColor="red"></asp:Label>
            </td>
      </tr>
      <tr>
        <td colspan="2">
            =应付款金额：
                    <%# Globals.MoneySymbol%>  <asp:Label ID="LabelShouldPayPriceValue" Text="0.00" runat="server" ForeColor="red"></asp:Label>
            &nbsp;&nbsp;&nbsp;
        </td>
      </tr>
      <tr>
        <td colspan="2">
            <asp:Label ID="LabelPromotionMessage" runat="server" />
            &nbsp;
            <asp:Label ID="LabelOrganizeMessage" runat="server"/>
        </td>
      </tr>
      <tr>
        <td colspan="2">
            <asp:ImageButton ID="ImageButtonCompute" runat="server" 
                ImageUrl="../Images/count.png" 
                />
&nbsp;
            <asp:ImageButton ID="ImageButtonCreate" runat="server" 
                ImageUrl="../Images/right.png"  />
          </td>
      </tr>    
          <tr>
              <td colspan="2">
                  <asp:Label ID="LabelNotifyMessage" runat="server"></asp:Label>
                  <br />
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" runat="server" 
                      ControlToValidate="TextBoxName" Display="Dynamic" ErrorMessage="收货人不能为空！"></asp:RequiredFieldValidator>
                  <br />
                  <asp:RequiredFieldValidator ID="RequiredFieldValidatorEmail" runat="server" 
                      ControlToValidate="TextBoxEmail" Display="Dynamic" ErrorMessage="电子邮件不能为空！"></asp:RequiredFieldValidator>
                    <br />
                  <asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" 
                      runat="server" ControlToValidate="TextBoxEmail" Display="Dynamic" 
                      ErrorMessage="电子邮件不正确！" 
                      ValidationExpression="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"></asp:RegularExpressionValidator>
                    <br />
                  <asp:RequiredFieldValidator ID="RequiredFieldValidatorAddress" runat="server" 
                      ControlToValidate="TextBoxAddress" Display="Dynamic" ErrorMessage=" 详细收货地址不能为空！"></asp:RequiredFieldValidator>
                  <br />
                         <asp:RequiredFieldValidator ID="RequiredFieldValidatorPostalcode" runat="server" 
                      ControlToValidate="TextBoxPostalcode" Display="Dynamic" ErrorMessage=" 邮政编码不能为空！"></asp:RequiredFieldValidator>
               <br />
                         <asp:RequiredFieldValidator ID="RequiredFieldValidatorTel" runat="server" 
                      ControlToValidate="TextBoxTel" Display="Dynamic" ErrorMessage=" 电话号码不能为空！"></asp:RequiredFieldValidator>
                       <br />
                  <br />

                   </td>
          </tr>
      </table>
  </div>
  <div class="ProductCartDown"></div>
<asp:HiddenField ID="HiddenFieldMemLoginID" Value="0"   runat="server" />
<!--存配送方式Guid -->
<asp:HiddenField ID="HiddenFieldDispatchModeGuid" Value="0"  runat="server" />
<!--存配送方式名称 -->
<asp:HiddenField ID="HiddenFieldDispatchModeName" Value=""  runat="server" />
<!--支付方式的Guid -->
<asp:HiddenField ID="HiddenFieldPaymentGuid" Value="0"  runat="server" />
<!--支付方式的名称-->
<asp:HiddenField ID="HiddenFieldPaymentName" Value=""  runat="server" />
<!--包装Guid-->
<asp:HiddenField ID="HiddenFieldPackGuid" Value="0"  runat="server" />
<!--包装包装名称-->
<asp:HiddenField ID="HiddenFieldPackName" Value=""  runat="server" />
<!--贺卡Guid-->
<asp:HiddenField ID="HiddenFieldlessCardGuid" Value="0"  runat="server" />
<!--贺卡名称-->
<asp:HiddenField ID="HiddenFieldBlessCardName" Value=""  runat="server" />
<!--发票类型-->
<asp:HiddenField ID="HiddenFieldInvoiceType" Value="0"  runat="server" />
<!--促销活动Guid-->
<asp:HiddenField ID="HiddenFieldSalesPromotionInfoGuid" Value="0"   runat="server" />
<!--促销活动类型guid-->
<asp:HiddenField ID="HiddenFieldSalesPromotionType" Value="0"   runat="server" />
<!--商品总重量-->
<asp:HiddenField ID="HiddenFieldAllWeight" Value="0.00"   runat="server" />
</ContentTemplate>
<Triggers>
   <asp:PostBackTrigger ControlID="ImageButtonCreate" />
<%--   <asp:PostBackTrigger ControlID="ImageButtonCompute" />--%>
</Triggers>
</asp:UpdatePanel>
