<%@ Page language="c#" Codebehind="MyOrders.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.MyOrders" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="NavBar" Src="Modules/NavBar.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Link" Src="Modules/Link.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Bulletin" Src="Modules/Bulletin.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<!--#include file="../../inc/encoding.inc"-->
		<title><%=GetResourceString("MyOrders")%>|<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->		
	</HEAD>
	<body>
			<div id="container">
			<uc1:Header id="Header1" runat="server"></uc1:Header>
		    <!--位置导航开始-->
			<div class="path"><a href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a> > <%=GetResourceString("MemberCenter")%> > <%=GetResourceString("MyOrders")%></div>
			<!--位置导航结束-->
			<div id="content">
				<div id="content_left_side">
					<!--会员中心导航开始-->
					<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
					<!--会员中心导航结束-->
					<!--订单反馈开始-->
					<div class="lframe">
						<div class="tl"></div>
						<div class="tr"></div>
						<div class="tm">
						    <%=GetResourceString("OrderFeedback")%>
					    </div>
						<div class="ml"></div>
						<div class="mr"></div>
						<div class="mm">
					        <%=GetFeedback()%>
						</div>
					    <div class="bl"></div>
					    <div class="br"></div>
					    <div class="bm"></div>
					</div>
					<!--订单反馈结束-->
				</div>
				<div id="content_middle_side">
					<!--内容开始-->
					<div class="mframe">
						<div class="tl"></div>
						<div class="tr"></div>
						<div class="tm"><div class="on"><%=GetResourceString("MyOrders")%></div></div>
						<div class="ml"></div>
						<div class="mr"></div>
						<div class="mm">
		                    <form id="Form1" method="post" runat="server">
						    <asp:datagrid id="dgOrderList" runat="server"
							AutoGenerateColumns="False" DataKeyField="OrderID" Width="100%" HorizontalAlign="Center" BorderWidth="1"
							BorderColor="#CCCCCC">
							<ItemStyle BackColor="White"></ItemStyle>
							<HeaderStyle BackColor="#E4E3E1"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="订单编号">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Height="20px" Width="8%"></ItemStyle>
									<ItemTemplate>
										<a href="#" onclick='printOrder(<%# DataBinder.Eval(Container.DataItem, "OrderID") %>)'>
											<%# DataBinder.Eval(Container.DataItem, "OrderNo") %>
										</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:BoundColumn DataField="OrderTime" HeaderText="下订时间" DataFormatString="{0:yyyy-MM-dd}">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="15%"></ItemStyle>
								</asp:BoundColumn>
								<asp:TemplateColumn HeaderText="TotalPrice">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="10%"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "TotalPrice","{0:f}") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="支付金额">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="13%"></ItemStyle>
									<ItemTemplate>
										<font color="Tomato">
											<%# GetPay(DataBinder.Eval(Container.DataItem, "TotalPrice").ToString(),DataBinder.Eval(Container.DataItem, "AdvancePayment").ToString())%>
										</font>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="订单状态">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="36%"></ItemStyle>
									<ItemTemplate>
										<%# GetStatus(DataBinder.Eval(Container.DataItem, "OrderID").ToString())%>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="操作">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
									<ItemTemplate>
										<a href="#" onclick='printOrder(<%# DataBinder.Eval(Container.DataItem, "OrderID") %>)'>
											<%=GetResourceString("ViewOrder")%></a> <a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>OrderFeedback.aspx?OrderID=<%# DataBinder.Eval(Container.DataItem, "OrderID") %>&type=1'>
											<%=GetResourceString("LeaveWord")%></a> <a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>OrderFeedback.aspx?OrderID=<%# DataBinder.Eval(Container.DataItem, "OrderID") %>&type=2'>
											<%=GetResourceString("Cancel")%></a>
									</ItemTemplate>
								</asp:TemplateColumn>
							</Columns>
						</asp:datagrid>
		                </form>
						<script language="javascript">
		                function printOrder(oid)
		                {
			                temp=window.open('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>OrderPrint.aspx?OrderID='+oid,'shopcat','width=800,height=850,scrollbars=yes,resizable=yes');
			                temp.focus();
		                }
						</script>
						</div>
					    <div class="bl"></div>
					    <div class="br"></div>
					    <div class="bm"></div>
					</div>
					<!--内容结束-->
				</div>
				<div style="clear:both;"></div>
			</div>
			<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
			<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		</div>
	</body>
</HTML>
