<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageAddress.aspx.cs" Inherits="Hidistro.UI.Web.WAP.ManageAddress" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.Common.Controls" Assembly="Hidistro.UI.Common.Controls" %>
<%@ Import Namespace="Hidistro.Core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<title>管理地址</title>
<link rel="stylesheet" type="text/css" href="style/css.css"/>
 <Hi:Script ID="Script2" runat="server" Src="/utility/jquery-1.3.2.min.js" />   
<script>
    function ChoseAddress(obj) {
        if(obj.checked)
            $("#hdshipingaddress").val(obj.value);
    }
    function CheckAddress() {
        if ($("#hdshipingaddress").val().replace(/\s/g, "") == "" || $("#hdshipingaddress").val().replace(/\s/g, "") ==null || parseInt($("#hdshipingaddress").val()) <= 0) {
            alert("请选择要确认的收货地址");
            return false;
        }
    }
</script>
</head>

<body>
<form runat="server">
<div class="ddwctop">收货地址</div>
<div class="gxnzbcsgw">
<ul>
<asp:Repeater ID="rp_address" runat="server" OnItemDataBound="rp_address_ItemDataBound">
<ItemTemplate>
<li><input name="radaddress" id="radaddress" type="radio" runat="server" value='<%# Eval("ShippingId") %>' onclick="ChoseAddress(this)" />&nbsp;&nbsp;<%# Eval("ShipTo")%>&nbsp;&nbsp;<%# ShowRegion(int.Parse(Eval("RegionId").ToString()))%> &nbsp;&nbsp;<%# Eval("Address")%>（<%# Eval("CellPhone")%>）<a href="EditeAddress_Wap.aspx?Id=<%# Eval("ShippingId") %>">修改地址>></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
<div class="zfaniu"><asp:Button ID="btnAddAddress" Text="新增地址" CssClass="btnaddress" runat="server" /> <asp:Button ID="btnsure" Text="确定"  CssClass="totalbtn" runat="server" OnClientClick="return CheckAddress()" /></a></div>
<!--[if lt IE 9]>
　　　　<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
　　<![endif]-->
　　<input type="hidden" id="hdshipingaddress" runat="server" value="0" />
　　</form>
</body>
</html>

