<%@ Page language="c#" Codebehind="CouponFavourites.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.CouponFavourites" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.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("Favourites")%>,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<script language=javascript>
		function addtocart(pid)
		{
			if('<%=config.ShopStop%>' == 'True')
			{
				temp=window.open('<%=webSite %>ShoppingCart.aspx?pid='+pid,'shopcat','width=700,height=850,scrollbars=yes,top=0,left=0,resizable=yes');
				temp.focus();
			}
			else
			{
				alert('<%=config.ShopStopWords%>');
				return false;
			}
		}
		</script>
	</HEAD>
	<body>
	<% if (HaveCoupon(Request.Url.ToString())){%>
			<div id="container">
			<uc1:Header id="Header1" runat="server"></uc1:Header>
			<!--位置导航开始-->
			<div class="path"><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;<%=GetResourceString("MemberCenter")%>&nbsp;&gt;&nbsp;<%=GetResourceString("CouponFavourites")%></div>
			<!--位置导航结束-->
			<div id="clear">
				<div id="content_left">
					<!--会员中心导航开始-->
					<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
					<!--会员中心导航结束-->
				</div>
				<div id="content_right">
				    
					<!--内容开始-->
                    <form id="Form1" method="post" runat="server">
						<div class="member_middle_right">
						<h3><%=GetResourceString("CouponFavourites")%></h3>
						<hr class="itemhr" />
						    <table width="100%" cellspacing="0" cellpadding="0">
							    <tr>
								    <td width="10"></td>
								    <td align="center">
									    <asp:datagrid id="dgListt" CssClass="dgborder" runat="server" AutoGenerateColumns="False" DataKeyField="CouponMemberID" Width="100%"
										    HorizontalAlign="Center" BorderWidth="1" BorderColor="#d6d6d6">
										    <ItemStyle BackColor="White"></ItemStyle>
										    <HeaderStyle BackColor="#E4E3E1"></HeaderStyle>
										    <Columns>
											    <asp:TemplateColumn HeaderText="礼券名称">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
												    <ItemTemplate>
														<%# DataBinder.Eval(Container.DataItem, "Name")%>
												    </ItemTemplate>
											    </asp:TemplateColumn>											    
											    <asp:TemplateColumn HeaderText="优惠券内码">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
												    <ItemTemplate>
														<%# DataBinder.Eval(Container.DataItem, "Account") %>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <asp:TemplateColumn HeaderText="礼券类型">
												    <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Left"></ItemStyle>
												    <ItemTemplate>
													    <%# GetCouponType(DataBinder.Eval(Container.DataItem, "Type").ToString()) %>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <asp:TemplateColumn HeaderText="优惠内容">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center"></ItemStyle>
												    <ItemTemplate>
													    <%# DataBinder.Eval(Container.DataItem, "Price") %><%# DataBinder.Eval(Container.DataItem, "Type").ToString() == "1" ? "折" : "元"%>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <asp:TemplateColumn HeaderText="最低消费金额">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center"></ItemStyle>
												    <ItemTemplate>
													    <%# DataBinder.Eval(Container.DataItem, "LowestConsumption") %>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    
											    <asp:TemplateColumn HeaderText="兑换(派发)时间">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
												    <ItemTemplate>
														<%# DataBinder.Eval(Container.DataItem, "Exchangetime", "{0:d}")%>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <asp:TemplateColumn HeaderText="过期时间">
												    <HeaderStyle HorizontalAlign="Center" width="60px"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" width="60px" Height="20px"></ItemStyle>
												    <ItemTemplate>
													    <%# GetExpireInfo(DataBinder.Eval(Container.DataItem, "ExpireDate").ToString()) %>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <asp:TemplateColumn HeaderText="状态">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
												    <ItemTemplate>
														<%# (DataBinder.Eval(Container.DataItem, "Usetime").ToString() != null && DataBinder.Eval(Container.DataItem, "Usetime").ToString() != "") ? "<font color=red>" + GetResourceString("Used") + "</font>" : GetResourceString("NotUsed")%>
												    </ItemTemplate>
											    </asp:TemplateColumn>
											    <%--<asp:TemplateColumn HeaderText="">
												    <HeaderStyle HorizontalAlign="Center" width="50px"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" width="50px"></ItemStyle>
												    <ItemTemplate>
													    <%# DataBinder.Eval(Container.DataItem, "Reviews") %>
												    </ItemTemplate>
											    </asp:TemplateColumn>--%>
											    <asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
												    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
												    <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
											    </asp:ButtonColumn>
										    </Columns>
									    </asp:datagrid>
								    </td>
								    <td width="10"></td>
							    </tr>
							    <tr>
								    <td colspan="3" height="20"></td>
							    </tr>
						    </table>
						    <div style="clear:both;"></div>
					</div>
		            </form>
					<!--内容结束-->
				</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>
