<%@ Page Language="C#" MasterPageFile="~/Dialog/DialogMaster.Master" AutoEventWireup="true"
    CodeBehind="AddressEdit.aspx.cs" Inherits="OAWeb.User.AddressEdit"  EnableEventValidation="false"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .table_list td
        {
            text-align: left;
        }
    </style>
    <!--客户收货地址选择hide-->
    <div style="width: 600px; padding: 10px">
        <div class="">
            <asp:Panel ID="pnlAdd" runat="server">
                <div class="form" style=" padding: 10px;">
                    <table cellpadding="0" cellspacing="0" border="0" class="table_form">
                        <tr>
                            <td class="right">
                                <span class="red">*</span> 收货人：
                            </td>
                            <td>
                                <asp:TextBox ID="txtShipTo" runat="server" CssClass="text" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="right ">
                                电话：
                            </td>
                            <td>
                                <asp:TextBox ID="txtTelePhone" runat="server" CssClass="text" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="right">
                                手机：
                            </td>
                            <td>
                                <asp:TextBox ID="txtMobile" runat="server" CssClass="text" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="right">
                                <span class="red">*</span> 地区：
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlProvince" runat="server">
                                    <asp:ListItem Value="0">省份</asp:ListItem>
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddlCity" runat="server">
                                    <asp:ListItem Value="0">城市</asp:ListItem>
                                </asp:DropDownList>
                                <asp:TextBox ID="txtAddress" runat="server" CssClass="text width200" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="right ">
                                邮编：
                            </td>
                            <td>
                                <asp:TextBox ID="txtZipCode" runat="server" CssClass="text" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="right ">
                                电子邮件：
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="text" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center">
                                <input id="btnSave" type="button" value=" 保 存 " class="btn_77px" />
                                <input id="btnClose" type="button" value=" 取 消 " onclick="art.dialog.close();"
                                    class="btn_77px" />
                            </td>
                        </tr>
                    </table>
                </div>
                <script type="text/javascript">

                    function ProvinceChange(id, op, bindControlId) {
                        AjaxProvinceCity('/User/Ajax.aspx?op=' + op + '&id=' + id, bindControlId);
                    }

                    $(document).ready(function () {
                        $("#<%=ddlProvince.ClientID %>").change(function () {
                            ProvinceChange(this.value, 'LoadCityJson', '<%=ddlCity.ClientID %>');
                        })

                        $("#btnSave").click(function () {
                            $("#aspnetForm").ajaxSubmit({
                                url: "/User/AddressEdit.aspx?op=Save&CId=<%=CId %>&type=add&Id=<%=Id %>&r=" + Math.random(),
                                success: function (result) {
                                    if (result == "ok") {
                                        alert("保存成功");
                                        CloseReload();
                                    } else {
                                        alert(result);
                                    }
                                }
                            });
                            return false;
                        })
                    });
                </script>
            </asp:Panel>
        </div>
    </div>
</asp:Content>
