<%@ Register TagPrefix="cc1" Namespace="PayPal.Web.Controls" Assembly="PayPal.Web.Controls" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/CartHeader.ascx" %>
<%@ Page language="c#" Codebehind="CheckoutSucc.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.CheckoutSucc" %>
<!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>
		<!--#include file="../../inc/encoding.inc"-->
		<title>成功提交订单</title>
		<!--#include file="../../inc/head.inc"-->
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/mycart.css" rel="stylesheet" />	
		<style type="text/css">
		     @media print {
                 .noprint {
                     display: none;
                 }
             }
			 .bank{ border:solid red 1px;}
             
		</style>
		<script type="text/javascript">
            $(document).ready(function(){
                $('#btnpay').click(function(){
                    if($('[@name=payment]').length != 0){
                        if($('[@name=payment][@checked]').length == 0){
                            alert('请选择支付方式');return false;
                        }else{
                            $.ajax({
                                url:'ajax.aspx?NoCopyRight=1&type=UpdatePayment&OrderID=<%=Request.QueryString["OrderID"] %>',
                                type:'post',
                                data:$('input[@name=payment]').serialize(),
                                cache:false,
                                async:false,
                                success:function(data){
                                    if(data==1){
                                        $('#formpay').submit();
                                    };
                                },
                                error:function(){alert('error');}
                            });
                        };
                    };
                });
				
				$('[name=bank]').hover(
					function () {
						$(this).addClass('bank');
					},
					function () {
						$(this).removeClass('bank');
					}
				); 

            });
		</script>
	</HEAD>
	<body>
	    <uc1:Header id="Header1" runat="server"></uc1:Header>
	    
        <div class="xp-w clear">
		    <div class="cart_step clear">
		        <div style="float:left; margin-right:20px;"><%=config.SiteLogo %></div>
                <ul>
                    <li class="outsc">
                        1.我的购物车
                    </li>
                    <li class="outco">
	                    2.选择订单
	                </li>
                    <li class="outso">
                        3.确认订单信息
                    </li>
                    <li class="ons">
                        4.成功提交订单
                    </li>
                </ul>
            </div>
            <div style="color:#ff6501; font-weight:bold; font-size:16px; margin:10px 0px;">订单已成功提交，谢谢您的惠顾！</div>
		    <form id="Form1" method="post" runat="server">
			    <div class="cartframe">
				    <div class="tl"></div>
				    <div class="tr"></div>
				    <div class="tm"></div>
				    <div class="ml"></div>
				    <div class="mr"></div>
				    <div class="mm">
				        <table width="100%" cellpadding="0" cellspacing="6" style="background:#fffee2; border-bottom:1px #ededed solid;">
		                    <tr>
			                    <td style=" padding:10px 0px 0px 20px; color:#424041; font-weight:bold; font-size:14px; text-align:right; width:160px;">
			                        您的订单编号：
			                    </td>
			                    <td style=" padding:10px 20px 0px 0px; width:85%; font-weight:bold; font-size:14px;color:#ff6600; text-align:left;"><%=OrderNo%></td>
		                    </tr>
		                    <tr>
			                    <td style=" padding:0px 0px 0px 20px; color:#424041; font-weight:bold; font-size:14px; text-align:right; width:160px;">
			                        <%=GetResourceString("TotalPrice")%>：
			                    </td>
			                    <td style=" padding:0px 20px 0px 0px; font-weight:bold; font-size:14px;color:#ff6600; text-align:left;">
			                     ￥<%=string.Format("{0:f}",TotalPrice)%>
			                    </td>
		                    </tr>
		                    <tr>
			                    <td style=" padding:0px 0px 0px 20px; color:#424041; font-weight:bold; font-size:14px; text-align:right; width:160px;">
			                        已付款金额：
			                    </td>
			                    <td style=" padding:0px 20px 0px 0px; font-weight:bold; font-size:14px;color:#ff6600; text-align:left;">
			                        ￥<%=string.Format("{0:f}", PayedMoney)%>
			                    </td>
		                    </tr>
		                    <tr>
			                    <td style=" padding:0px 0px 0px 20px; color:#424041; font-weight:bold; font-size:14px; text-align:right; width:160px;">
			                        还需付款金额：
			                    </td>
			                    <td style=" padding:0px 20px 0px 0px; font-weight:bold; font-size:14px;color:#ff6600; text-align:left;">
			                        ￥<%=NeedPayMoney%>
			                    </td>
		                    </tr>
	                    </table>
	                    
	                    <table width="100%" style=" border-bottom:1px #ededed solid;">
	                        <tr>
	                            <td style=" padding:20px 0px 20px 20px; color:#424041; font-weight:bold; font-size:14px; text-align:right; width:180px;">
	                                您选择的支付类型为：
	                            </td>
	                            <td style=" padding:20px 20px 20px 0px; width:82%; font-weight:bold; font-size:14px;color:#ff6600; text-align:left;">
	                                <%=PayTypeName%>
	                            </td>
	                        </tr>
	                    </table>
	                    <table width="100%" cellpadding="0" cellspacing="6" style="border-bottom:1px #ededed solid;">
	                        <tr>
	                            <td style="padding-left:20px;">
	                                <%if(PayType == 1 && NeedPayMoney > 0){ %>
	                                    <%=GetAD(58)%>
	                                <%} else if (PayType == 2){ %>
	                                    <%=GetAD(59)%>
	                                <%} else if (PayType == 3){ %>
	                                    <%=GetAD(60)%>
	                                <%} else if(PayType == 4){ %>
	                                    <%=GetAD(61)%>
	                                <%} else if(PayType == 5){ %>
	                                    <%=GetAD(62)%>
	                                <%} else if (PayType == 6){%> 
	                                    <%=GetAD(63)%>
	                                <%} %>
	                            </td>
	                        </tr>
	                    </table>
			            <%if (PayType <=4 && NeedPayMoney > 0){%>
                    	    <%if(PayType ==1 ){%>
                                <div style="height:50px; line-height:50px;">&nbsp;&nbsp;&nbsp;&nbsp;请点击以下支付网关支付</div>
                            <%}%>
			                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="liststyle data">
                                <%--<colgroup class="span-4 ColColorGray"></colgroup>--%>
                                <colgroup class="span-auto"></colgroup>
	                            <%for(int i=0;i<dtPayment.Rows.Count;i++){ %>
                                <tr>
	                                
                                    <td>
                                        <%if(PayType==1) {%>
								            <input type="radio" name="payment" value="<%=dtPayment.Rows[i]["PaymentID"]%>" />
								        <%} %>
                                        
		                            </td>
		                            <td>
		                                <%--<%=dtPayment.Rows[i]["Name"]%>--%>
										<%=dtPayment.Rows[i]["Description"]%></li>
		                            </td>
		                        </tr>
                                <%} %>
                                
			                </table>
			            <%} if (PayType == 6 && dtZtd.Rows.Count>0){ %>
			                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="liststyle data">
			                    <colgroup class="span-4 ColColorGray"></colgroup>
                                <colgroup class="span-auto"></colgroup>
			                    <tr>
			                        <th>门店名称：</th>
			                        <td><%=dtZtd.Rows[0]["ZtdName"]%></td>
			                    </tr>
			                    <tr>
			                        <th>门店地址：</th>
			                        <td><%=dtZtd.Rows[0]["Address"]%></td>
			                    </tr>
			                    <tr>
			                        <th>详细说明：</th>
			                        <td><%=dtZtd.Rows[0]["Remark"]%></td>
			                    </tr>
			                </table>
			            <%} %>
		                <table width="100%" cellpadding="0" cellspacing="6" style="border-top:1px #ededed solid;">
		                    <%if (PayType == 1 && NeedPayMoney > 0){%>
		                    <tr>
		                        <td>
				                    <input type="button" id="btnpay" value=" " />
		                        </td>
		                    </tr>
		                    <%}else{ %>
		                    <tr>
		                        <td style=" padding:10px 20px; line-height:30px;">
		                            <div style="font-weight:bold; color:#424041; font-size:14px;">您现在还可以：</div>
		                            <%if (CurrentUser.MemberID > 0 && CurrentUser.Name != "anonymous")
                                { %><a href='<%=webSite %>OrderDetail-<%=Request.QueryString["OrderID"] %>.<%=config.html%>' style="color:#1d4b99">查看订单状态</a><%} %>
		                            <a href='<%=webSite %>index.<%=config.html %>' style="color:#1d4b99;">继续购物</a>
		                        </td>
		                    </tr>
		                    <%} %>
		                </table>
		                <%=GetAD(93)%>
				    </div>
				    <div class="bl"></div>
				    <div class="br"></div>
				    <div class="bm"></div>
			    </div>
		    </form>
	    </div>
		<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
	<%if (PayType == 1 && NeedPayMoney > 0) {%>
	<form id="formpay" action='<%=webSite %>OrderPay-<%=Request.QueryString["OrderID"] %>.<%=config.html%>' method="post" target="_blank"></form>
	<%} %>
	</body>
</html>
