<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TOrderPrint.aspx.cs" Inherits="web.TOrderPrint" %>


<%@ Register TagPrefix="cc1" Namespace="PayPal.Web.Controls" Assembly="PayPal.Web.Controls" %>
<!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>
	<link href="img/css/base.css" rel="stylesheet" type="text/css" media="all" />

<link href="img/css/index.css" rel="stylesheet" type="text/css" media="all" />
<link href="img/css/style.css" rel="stylesheet" type="text/css" media="all" />
		<script>
function saveHTML() {
var time=new Date();
var filename=time.toLocaleDateString();
filename=filename+"团餐订单.htm";
var SaveTalks=window.open('about:blank','_blank','width=800  height=500  left=200,top=200');
SaveTalks.document.open("text/html","gb2312");
SaveTalks.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>'+filename+'</title></head><body>'+document.getElementById("neirong").innerHTML+"</body></html>");
SaveTalks.document.execCommand ("SaveAs",true,filename);
parent.document.getElementById('nr').style.display='none';
SaveTalks.close();

} 
function clos()
{
parent.document.getElementById('nr').style.display='none';
}
		</script>
		<SCRIPT language="JavaScript">
		function printPage() 
		{
			eval("printOrder" + ".style.display=\"none\";");
			window.print(); 
		}
function Button1_onclick() {
saveHTML();
}

		</SCRIPT>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	<asp:literal id="ltrPayment" Runat="server"></asp:literal>
		<form id="Form1" method="post" runat="server">
	 <div id="neirong" style="width:680px;">
	
			
    <TABLE cellSpacing="0" cellPadding="0" width="780" border="0" align="center">
      <TBODY>
					<TR>
						<TD vAlign="middle" width="3%"><STRONG><BR>
							</STRONG>
						</TD>
						<TD vAlign="middle" align="center" width="2%">
							
						</TD>
						
          <TD class="body-shoptitle" vAlign="middle" align="center" width="95%"><br>
            订单编号
            ： 
            <%=order.OrderNo%>；
            下订时间
            ： 
            <%=order.OrderTime%>
            <%if(order.ShipTime!=""){%>
            <BR>
							<%=GetResourceString("DeliverGoodsDate")%>：<%=order.ShipTime%><%}%>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			<TABLE cellSpacing="0" cellPadding="0" width="680" border="0">
  <TBODY>
					<TR>
						<TD>&nbsp;</TD>
					</TR>
				</TBODY>
			</TABLE>
			
    <TABLE cellSpacing="0" cellPadding="1" width="780" border="0">
      <TBODY>
					<TR>
						<TD><STRONG>1、团餐信息</STRONG>
							<HR noShade SIZE="1">
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			
    <TABLE cellSpacing="3" cellPadding="3" width="780" border="0">
      <TBODY>
        <TR> 
          <TD style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"
							align="left" width="334" height="26">&nbsp;&nbsp;&nbsp;&nbsp; 
          团购名称
          </TD>
          <TD style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"
							align="center" width="64" height="26"> 
            <%=GetResourceString("OrderEmail_Quantity")%>
          </TD>
          <TD style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"
							align="center" width="98" height="26"> 
            <%=GetResourceString("OrderEmail_UnitPrice")%>
          </TD>
          <td width="99" height="33" align="center" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
            <%=GetResourceString("zdjq")%>
          </td>
          <td width="64" height="33" align="center" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
            <%=GetResourceString("zjf")%>
          </td>
          <td height="33" width="124" align="center" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
            <%=GetResourceString("SumPrice")%>
          </td>
        </TR>
        <!-- BEGIN row -->
        <asp:repeater id="rptOrderItems" Runat="server"> 
          <ItemTemplate> 
            <TR> 
              <TD align="left" width="334" height="20"> 
                <%# DataBinder.Eval(Container.DataItem, "ProductName") %>
              </TD>
              <TD align="center" width="334" height="20"> 
                <%# DataBinder.Eval(Container.DataItem, "Quantity") %>
                份</TD>
              <TD align="center" width="98" height="20"> 
                <%=GetCurrency()%>
                <%# DataBinder.Eval(Container.DataItem, "UnitPrice","{0:f2}") %>
              </TD>
              <td width="99" height="20" align="center" bgcolor="#FFFFFF"> 
                <%# Getdj(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ProductID").ToString())) == "0.0000" ? "0元" : "" + Getdj(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ProductID").ToString())) + "元"%>
              </td>
              <td width="104" height="20" align="center" bgcolor="#FFFFFF"> 
                <%# Getsc(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ProductID").ToString())) == "0" ? "0点" : "" + Getsc(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ProductID").ToString())) + "点"%>
              </td>
              <td height="20" align="center" bgcolor="#FFFFFF"> 
                <%=GetCurrency()%>
                <%# DataBinder.Eval(Container.DataItem, "SubPrice","{0:f2}") %>
              </td>
            </TR>
          </ItemTemplate>
        </asp:repeater>
 
      </TBODY>
    </TABLE>
    <br>
    <br>
    <TABLE cellSpacing="0" cellPadding="2" width="780" border="0">
      <tr>
					<td vAlign="top" width="50%">
						<table width="100%">
            <tr> 
              <td >特卖商家 ：<a href="company/company_<%=order.Sjid%>.html" target="_blank"> 
                <%= GetCom(order.Sjid)%>
                ( 查看 )</a> </td>
            </tr>
            <tr> 
              <td > 
                <%=GetResourceString("OrderStatus")%>
                ： 
                <%= GetStatus(orderID.ToString()).ToString()%>
              </td>
            </tr>
            <tr> 
              <td height="23"> 支付方式 ： 
                <%=GetPaymentName(order.PaymentType)%>
              </td>
            </tr>
            <tr> 
              <td> 
               联系手机
                ： 
                <%=order.BuyerPhone%>
               
              </td>
            </tr>
          </table>
					</td>
					<td width="50%">
						<table width="100%">
            <tr> 
              <td width="50%" height="25"
									align="right" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
             商品总金额
                ：</td>
              <td width="10%"></td>
              <td> 
                <%=GetCurrency()%>
                <%=string.Format("{0:f}",order.ProductPrice)%>
              </td>
            </tr>
     
            <tr> 
              <td width="50%" height="25"
									align="right" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
               订单总金额
                ：</td>
              <td width="10%"></td>
              <td> 
                <%=GetCurrency()%>
                <%=string.Format("{0:f}",order.TotalPrice)%>
              </td>
            </tr>
            <tr> 
              <td width="50%" height="25"
									align="right" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
                <%=GetResourceString("OrderEmail_AdvancePayment")%>
                ：</td>
              <td width="10%" rowspan="2"></td>
              <td> 
                <%=GetCurrency()%>
                <%=string.Format("{0:f}",order.AdvancePayment)%>
              </td>
            </tr>
            <tr style="display:none;"> 
              <td height="25"
									align="right" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid">使用代餐券：</td>
              <td>
                <%=GetCurrency()%>
                <%=string.Format("{0:f}",order.Dxdjq)%>
              </td>
            </tr>
            <tr> 
              <td width="50%" height="25"
									align="right" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-BOTTOM: #CCCCCC 1px solid"> 
                <%=GetResourceString("OrderEmail_Pay")%>
                ：</td>
              <td width="10%"></td>
              <td><font color="red"> 
                <%=GetCurrency()%>
                <%=GetPay()%>
                </font></td>
            </tr>
          </table>
          
					</td>
				</tr>
			</TABLE>

    <table width="780">
      <tr>
					<td><STRONG>2、<%=GetResourceString("OrderComment")%></STRONG></td>
				</tr>
				<tr>
					<td><%=order.Remark%></td>
				</tr>
				<tr>
					<td height="20" align="center" valign="middle">
					<%if(!(order.PayStatus > 0)){%>
					<%if(Getbool(payment.InterfaceID)) {%>
					<asp:Label ID="cft" runat="server"></asp:Label>
					<cc1:uploadcompletecartbutton id="UploadCompleteCartButton1" runat="server" Visible="False"></cc1:uploadcompletecartbutton><br>
						<asp:Label id="lbHidden" runat="server" Visible="False">USD</asp:Label><br>
					<SPAN id="onlinePay">
							<input style="display:<%=payOnline %>;BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; WIDTH: 69px; BORDER-BOTTOM: #CCCCCC 1px solid; HEIGHT: 22px"
								onclick="frmPay.submit()" type="button" value="在线支付"></SPAN>
								<%}}%>
					<SPAN id="printOrder"><input type="button" onClick="printPage()" value="打 印" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; WIDTH: 69px; BORDER-BOTTOM: #CCCCCC 1px solid; HEIGHT: 22px">
                        <input id="Button1" type="button" value="下载信息去打印" onclick="return Button1_onclick()" style="BORDER-RIGHT: #CCCCCC 1px solid; BORDER-TOP: #CCCCCC 1px solid; BORDER-LEFT: #CCCCCC 1px solid; WIDTH: 169px; BORDER-BOTTOM: #CCCCCC 1px solid; HEIGHT: 22px" /></SPAN></td>
				</tr>
			</table>
			</div>
		</form>
		
	</body>
</HTML>