<%@ Page language="c#" Codebehind="MyCoupons.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.MyCoupons" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.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>兑换优惠券,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/member.css" type="text/css" rel="stylesheet" />
		<script language="javascript">
		function addtogift(gid)
		{
			temp=window.open('GiftInfo.aspx?gid='+gid,'shopcat','width=700,height=850,scrollbars=yes,resizable=yes');
			temp.focus();
		}
		</script>
	</HEAD>
	<body>
	<% if (HaveCoupon(Request.Url.ToString())){%>
	    <uc1:header id="Header1" runat="server"></uc1:header>
	    <div class="xp-qgw clear">
	        <!--位置导航开始-->
	        <div class="path"><h5><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a> &nbsp;&gt;&nbsp;<a href="<%=webSite %>Center.<%=config.html %>"><%=GetResourceString("MemberCenter")%></a>&nbsp;&gt;&nbsp;兑换优惠券</h5></div>
	        <!--位置导航结束-->
			<div class="member_left">
				<!--会员中心导航开始-->
				<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
				<!--会员中心导航结束-->
			</div>
			<div class="member_middle_right">
	            <!--内容开始-->
	            <div class="mframe">
		            <div class="tl"></div>
		            <div class="tr"></div>
		            <div class="tm">优惠券列表</div>
		            <div class="ml"></div>
		            <div class="mr"></div>
		            <div class="mm">
					    <asp:datagrid id="dgList" CssClass="dgborder"  runat="server" AutoGenerateColumns="False" DataKeyField="CouponID" Width="100%" HorizontalAlign="Center" BorderWidth="1" BorderColor="#d6d6d6">
                            
			                <ItemStyle BackColor="White"></ItemStyle>
			                <HeaderStyle BackColor="#fff7d3" Height="20px"></HeaderStyle>
                            <Columns>
                                <asp:TemplateColumn HeaderText="优惠券">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px" Width="30%"></ItemStyle>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "CouponName") %>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="所需积分">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px" Width="20%" BackColor="#FBF7EE"></ItemStyle>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "Score") %>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="面值">
								    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								    <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>
								    <ItemTemplate>
									    <%# DataBinder.Eval(Container.DataItem, "CouponValue")%>
								    </ItemTemplate>
							    </asp:TemplateColumn>
							    <asp:TemplateColumn HeaderText="所需消费金额">
								    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								    <ItemStyle HorizontalAlign="Center" Width="10%"></ItemStyle>
								    <ItemTemplate>
									    <%# DataBinder.Eval(Container.DataItem, "MinMoney")%>
								    </ItemTemplate>
							    </asp:TemplateColumn>
							    <asp:TemplateColumn HeaderText="有效期">
								    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								    <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
								    <ItemTemplate>
									    <%# DataBinder.Eval(Container.DataItem, "BeginTime", "{0:yyyy-MM-dd}")%>至<%# DataBinder.Eval(Container.DataItem, "EndTime", "{0:yyyy-MM-dd}")%>
								    </ItemTemplate>
							    </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="操作">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px" Width="10%"></ItemStyle>
                                    <ItemTemplate>
                                        <a href="<%=webSite %>MyCoupons-<%# DataBinder.Eval(Container.DataItem, "CouponID") %>.<%=config.html%>"><u>兑换</u></a>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                        </asp:datagrid>
                    </div>
			        <div class="bl"></div>
			        <div class="br"></div>
			        <div class="bm"></div>
			    </div>
			    <!--内容结束-->
	        </div>
		</div>
		<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		<%} %>
	</body>
</HTML>

