<%@ Page language="c#" Codebehind="OrderListPrint.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Admin.OrderListPrint" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script language="javascript">
		function onprint()
		{
		  window.print();
		  }
		</script>
		<style>
		TD { FONT-SIZE: 12px }
		</style>
	</HEAD>
	<body MS_POSITIONING="GridLayout" onload="onprint()">
		<form id="Form1" method="post" runat="server">
			<table class="tableBorder" cellSpacing="0" cellPadding="0" width="100%" align="center"
				border="0">
				<tr>
					<td>
						<asp:DataGrid id="dgOrderList" runat="server" AutoGenerateColumns="False" DataKeyField="OrderID"
							Width="100%" BorderWidth="1px" BorderColor="Black">
							<Columns>
								<asp:TemplateColumn HeaderText="跟单员">
									<ItemStyle Width="60px"></ItemStyle>
									<ItemTemplate>
										<%# GetMember(DataBinder.Eval(Container.DataItem, "OrderID").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="单号">
									<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="70px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "OrderNo") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:BoundColumn DataField="OrderTime" HeaderText="下订时间" DataFormatString="{0:yyyy-MM-dd HH:mm}">
									<ItemStyle HorizontalAlign="Center" Width="90px"></ItemStyle>
								</asp:BoundColumn>
								<asp:TemplateColumn HeaderText="货品总额">
									<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "ProductPrice","{0:c}") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="运费">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "ShipPrice","{0:c}") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="总金额">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "TotalPrice","{0:c}") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="使用预付款">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "AdvancePayment","{0:c}") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="实际应付款">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# GetPay(DataBinder.Eval(Container.DataItem, "TotalPrice").ToString(),DataBinder.Eval(Container.DataItem, "AdvancePayment").ToString())%>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="配送方式">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
									<ItemTemplate>
										<%# GetShippingName(DataBinder.Eval(Container.DataItem, "ShippingType").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="支付方式">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
									<ItemTemplate>
										<%# GetPaymentName(DataBinder.Eval(Container.DataItem, "PaymentType").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="购物会员">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# GetMemberName(DataBinder.Eval(Container.DataItem, "MemberID").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="收货人">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "ReceiverName") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="联系电话">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="90px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "ReceiverPhone") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="订单状态">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
									<ItemTemplate>
										<%# GetStatus(DataBinder.Eval(Container.DataItem, "OrderID").ToString())%>
									</ItemTemplate>
								</asp:TemplateColumn>
							</Columns>
						</asp:DataGrid>
					</td>
				<tr>
				</tr>
			</table>
		</form>
	</body>
</HTML>
