<%@ Page language="c#" Codebehind="MyAddresses.aspx.cs" AutoEventWireup="true" enableEventValidation="false" Inherits="XpShop.WebUI.MyAddresses" %>
<%@ 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>地址簿</title>
		<!--#include file="../../inc/head.inc"-->
		<script src="<%=webSite %>inc/MyAddresses.js" type="text/javascript"></script>
		<script src="<%=webSite %>inc/Address.js" type="text/javascript"></script>
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/member.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript">
		    //以下变量在MyAddresses.js中用到
		    var strSelectArea = '<%=GetResourceString("SelectArea")%>';
		    var strPleaseLogin = '<%=GetResourceString("MsgPleaseSignInFirst")%>';
		    var strNewAddressAlert = '<%=GetResourceString("NewAddressAlert")%>';
		    var strCheckOut_Alert1 = '<%=GetResourceString("CheckOut_Alert1")%>';
		</script>
	</HEAD>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
	    <div class="xp-qgw clear">
		    <!--位置导航开始-->
		    <div class="path"><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;<%=GetResourceString("AddressBook")%></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"><%=GetResourceString("AddressBook")%></div>
		            <div class="ml"></div>
		            <div class="mr"></div>
		            <div class="mm">
	                    <form id="Form1" method="post" runat="server">
				           <asp:datalist id="dlAddress" runat="server" DataKeyField="ReceiverAddressID" RepeatColumns="2" RepeatDirection="Horizontal" RepeatLayout="Table"
							    CellSpacing="0" CellPadding="0" Width="90%" Visible="true" GridLines="None">
							    <ItemStyle CssClass="alignCenterTop" />
							    <ItemTemplate>
								    <table cellpadding="0" cellspacing="10" border="0">
									    <tr>
										    <td><%=GetResourceString("ReceiverName")%>：<%#DataBinder.Eval(Container.DataItem,"ReceiverName")%></td>
									    </tr>
									    <tr>
										    <td><%=GetResourceString("Area")%>：<%#GetArea(DataBinder.Eval(Container.DataItem,"ReceiverAddress").ToString())%></td>
									    </tr>
									    <tr>
										    <td><%=GetResourceString("DetailAddress")%>：<%#GetAddress(DataBinder.Eval(Container.DataItem,"ReceiverAddress").ToString())%></td>
									    </tr>
									    <tr>
										    <td><%=GetResourceString("OrderEmail_Postalcode")%>：<%#DataBinder.Eval(Container.DataItem,"ReceiverZip")%></td>
									    </tr>
									    <tr>
										    <td><%=GetResourceString("PhoneNumber")%>：<%#DataBinder.Eval(Container.DataItem,"ReceiverPhone")%></td>
									    </tr>
									    <tr>
										    <td><%=GetResourceString("Mobile")%>：<%#DataBinder.Eval(Container.DataItem,"ReceiverMobile")%></td>
									    </tr>
									    <tr>
										    <td>邮箱：<%#DataBinder.Eval(Container.DataItem,"ReceiverEmail")%></td>
									    </tr>
									    <tr>
										    <td style="padding-left:10px;">
											    <a href="MyAddresses.aspx?action=update&receiverID=<%#DataBinder.Eval(Container.DataItem,"ReceiverAddressID")%>" class="link_update"><%=GetResourceString("Modify")%></a>
											    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											    <a href="MyAddresses.aspx?action=delete&receiverID=<%#DataBinder.Eval(Container.DataItem,"ReceiverAddressID")%>"><%=GetResourceString("Delete")%></a>
										    </td>
									    </tr>
									    <tr>
										    <td>
											    <hr noshade color="#cccccc" size="1" style="border-style: dotted; border-width: 1" width="100%">
										    </td>
									    </tr>
								    </table>
							    </ItemTemplate>
						    </asp:datalist>
				
				
				            <div id="addNewAddr"">
			                    <table cellpadding="0" cellspacing="0" class="tableinfo">
					                <tr>
						                <th class="th_title" colspan="2"><%=Request.QueryString["action"] == "update" ? "修改收货地址" : "新增收货地址"%></th>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("ReceiverName")%>：</th>
						                <td><asp:textbox id="txtRName" runat="server"></asp:textbox><FONT color="red">*</FONT></td>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("Area")%>：</th>
						                <td>
							                <asp:dropdownlist id="ddlTopAreas" name="ddlTopAreas" runat="server" AutoPostBack="false">
								                <asp:ListItem Value="0">选择地区</asp:ListItem>
							                </asp:dropdownlist>
							                <asp:dropdownlist id="ddlSubAreas" name="ddlSubAreas" runat="server" AutoPostBack="false">
								                <asp:ListItem Value="0">选择地区</asp:ListItem>
							                </asp:dropdownlist>
							                <asp:dropdownlist id="ddlThirdAreas" name="ddlThirdAreas" runat="server" AutoPostBack="false">
								                <asp:ListItem Value="0">选择地区</asp:ListItem>
							                </asp:dropdownlist>
							                <font color="red">*</font>
							                <input type="hidden" id="hideAddressIDs" name="hideAddressIDs" runat="server" />
						                </td>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("DetailAddress")%>：</th>
						                <td><asp:textbox id="txtRAddress" runat="server" Width="300px"></asp:textbox><FONT color="red">*</FONT></td>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("OrderEmail_Postalcode")%>：</th>
						                <td><asp:textbox id="txtRPostalcode" runat="server"></asp:textbox><FONT color="red">*</FONT></td>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("Mobile")%>：</th>
						                <td><asp:textbox id="txtRMobile" runat="server"></asp:textbox><FONT color="red">*</FONT></td>
					                </tr>
					                <tr>
						                <th><%=GetResourceString("PhoneNumber")%>：</th>
						                <td><asp:textbox id="txtRPhone" runat="server"></asp:textbox></td>
					                </tr>
					                <tr>
										<th>邮箱：</th>
										<td><asp:textbox id="txtREmail" runat="server"></asp:textbox></td>
									</tr>
					                <tr>
					                    <th>&nbsp;</th>
						                <td height="20" style="border-left:0 none;">
							                <asp:Button id="btnSubmit" OnClick="btnSubmit_Click" runat="server" Text="提交"></asp:Button>
						                </td>
					                </tr>
				                </table>
					        </div>
	                    </form>
	                </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>
	</body>
</HTML>
