<%@ Page language="c#" Codebehind="MyFavorite.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.MyFavorite" %>
<%@ 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("Favourites")%>|<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->		
		<script language=javascript>
		function addtocart(pid)
		{
			if('<%=config.ShopStop%>' == 'True')
			{
				temp=window.open('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>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>
			<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("Favourites")%></div>
			<!--位置导航结束-->
			<div id="content">
				<div id="content_left_side">
					<!--会员中心导航开始-->
					<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
					<!--会员中心导航结束-->
				</div>
				<div id="content_middle_side">
					<!--内容开始-->
					<form id="Form1" method="post" runat="server">
					<div class="mframe">
						<div class="tl"></div>
						<div class="tr"></div>
						<div class="tm"><div class="on"><%=GetResourceString("Favourites")%></div></div>
						<div class="ml"></div>
						<div class="mr"></div>
						<div class="mm">
					        <asp:datagrid id="dgList" runat="server" AutoGenerateColumns="False"
							    DataKeyField="FavoriteID" Width="100%" HorizontalAlign="Center" BorderWidth="1"
							    BorderColor="#CCCCCC">
							    <ItemStyle BackColor="White"></ItemStyle>
							    <HeaderStyle BackColor="#E4E3E1"></HeaderStyle>
							    <Columns>
								    <asp:TemplateColumn HeaderText="商品名称">
									    <HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
									    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
									    <ItemTemplate>
										    <a href='products/Product_<%# DataBinder.Eval(Container.DataItem, "PID") %>.html'>
											    <%# DataBinder.Eval(Container.DataItem, "Name") %>
										    </a>
									    </ItemTemplate>
								    </asp:TemplateColumn>
								    <asp:TemplateColumn HeaderText="会员价格">
									    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									    <ItemStyle HorizontalAlign="Center"></ItemStyle>
									    <ItemTemplate>
										    <%# DataBinder.Eval(Container.DataItem, "MemberPrice","{0:f}") %>
									    </ItemTemplate>
								    </asp:TemplateColumn>
								    <asp:TemplateColumn HeaderText="添加到购物车">
									    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									    <ItemStyle HorizontalAlign="Center"></ItemStyle>
									    <ItemTemplate>
										    <a href="#" onclick='addtocart(<%#DataBinder.Eval(Container.DataItem,"PID")%>)'><%=GetResourceString("ShoppingCartViewCart")%></a>
									    </ItemTemplate>
								    </asp:TemplateColumn>
								    <asp:ButtonColumn Text="Delete" HeaderText="删除" CommandName="Delete">
									    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									    <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
								    </asp:ButtonColumn>
							    </Columns>
						    </asp:datagrid>
						</div>
					    <div class="bl"></div>
					    <div class="br"></div>
					    <div class="bm"></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>
