<%@ page language="C#" validaterequest="false" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_UserInfoList, WebApp_deploy" title="商城用户资料设置" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        function ShowProvinceCity() {
            document.getElementById("display_province_city").style.display = "";
        }

        function checkInput() {
            var flag = "ctl00_ContentPlaceHolder1_";
            var checkArray = ["TxtU_TrueName", "TxtU_Address", "ZipCode", "TxtU_MobilePhone", "TxtU_HomePhone"];
            for (var i = 0; i < checkArray.length; i++) {
                var obj = document.getElementById(flag + checkArray[i]);
                if (obj.value == "") {
                    alert('必填选项不能为空');
                    obj.focus();
                    return false;
                }
            }
            return true;
        }
        function IdentifyRedirect() {
            window.open("../Credit/Identify_user.aspx", "identify", "", "");
        }
    </script>
    <div class="pageTitle">
        个人资料设置</div>
    <table class="ShopOrderStyle">
        <caption>
            用户信息</caption>
        <tr>
            <td class="OrderTitle">
                用户帐号：
            </td>
            <td>
                <asp:Literal ID="UserName" runat="server" /><span style="color:Red">*</span>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                真实姓名：
            </td>
            <td>
                <asp:TextBox ID="TxtU_TrueName" runat="server" Width="132px" MaxLength="50" /><span style="color:Red">*</span><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator2" ControlToValidate="TxtU_TrueName" runat="server"
                    ErrorMessage="不能为空"></asp:RequiredFieldValidator><asp:Label ID="Identify_truename_tips"
                        runat="server" Visible="false" />
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
               Email：
            </td>
            <td>
                <asp:Literal runat="server" ID="labemail" />
                [<a href="../Passport/confirm_email.aspx" target="_blank">修改</a>]<span style="color:Red">*</span>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                所在地：
            </td>
            <td>
                <asp:Literal ID="L_Province_City" runat="server" />
                <span style="cursor: pointer; color: #ff0000;" onclick="javascript:{document.getElementById('display_province_city').style.display='';}">
                    [更改]</span><span style="color:Red">*</span>
                <div style="display: none" id="display_province_city">
                    <div style="float: left;">
                        <asp:DropDownList ID="Province" runat="server" AutoPostBack="True" DataTextField="Province"
                            DataValueField="Province" AppendDataBoundItems="True" Width="80px" OnSelectedIndexChanged="SelectCity">
                            <asp:ListItem Value="" Text="所在地" />
                        </asp:DropDownList>
                    </div>
                    <div style="float: left;">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:DropDownList ID="City" runat="server" Width="80px" AutoPostBack="true" DataValueField="City"
                                    DataTextField="City" OnSelectedIndexChanged="SelectArea" __designer:wfdid="w6">
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddlArea" runat="server" Width="80px" DataTextField="Area" DataValueField="Area">
                                </asp:DropDownList>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="Province" EventName="SelectedIndexChanged">
                                </asp:AsyncPostBackTrigger>
                                <asp:AsyncPostBackTrigger ControlID="City" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                详细地址：
            </td>
            <td>
                <asp:TextBox ID="TxtU_Address" runat="server" Width="300px" Height="16px" MaxLength="50" /><span style="color:Red">*</span><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator3" ControlToValidate="TxtU_Address" runat="server"
                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr  style="display:none;">
            <td class="OrderTitle">
                邮政编码：
            </td>
            <td>
                <asp:TextBox ID="ZipCode" runat="server" Width="100px" Height="16px" MaxLength="6" value="100000"/><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator4" runat="server" ControlToValidate="ZipCode" 
                    ErrorMessage="不能为空" Enabled="False"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="ZipCode"
                    ErrorMessage="格式错误" ValidationExpression="\d{6}" Enabled="False"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr style="display:none;">
            <td class="OrderTitle">
                交易联系方式：
            </td>
            <td>
                <asp:RadioButtonList ID="RadioU_ContactType" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Selected="True" Value="0">固话</asp:ListItem>
                    <asp:ListItem Value="1">手机</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                手机号码：
            </td>
            <td>
                <asp:TextBox ID="TxtU_MobilePhone" runat="server" Width="132px" Height="16px" MaxLength="11" />
                <asp:HyperLink ID="HyperLink2" runat="server" Visible="False">点击这里进行绑定</asp:HyperLink>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="TxtU_MobilePhone"
                    ErrorMessage="格式错误" 
                    ValidationExpression="^((\(\d{3}\))|(\d{3}\-))?13[0-9]\d{8}|15[1234567890]\d{8}|18[1234567890]\d{8}$" 
                    Enabled="False"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr style="display:none">
            <td class="OrderTitle">
                固定电话：
            </td>
            <td>
                <asp:TextBox ID="TxtU_HomePhone" runat="server" Width="132px" Height="16px" MaxLength="50"  />
                (区号-电话-分机)<asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
                    ErrorMessage="格式错误" ValidationExpression="^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$"
                    ControlToValidate="TxtU_HomePhone" Enabled="False"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                证件类型：
            </td>
            <td>
                <asp:DropDownList ID="RadioU_IdentifyType" runat="server" Enabled="true">
                    <asp:ListItem Selected="True" Value="0">居民身份证</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                证件号码：
            </td>
            <td>
                <asp:TextBox ID="TxtU_IDCard" runat="server" Width="132px" Height="16px" MaxLength="18" />
                <asp:Label ID="identify_IDcard_tips" runat="server" Visible="false" />
                <asp:Label runat="server" Style="color: Gray;" ID="IDcard_msg" Text="(请认真填写，提交后不能修改)" />
                <asp:RegularExpressionValidator
                    ID="RegularExpressionValidator1" runat="server" ErrorMessage="格式错误" ControlToValidate="TxtU_IDCard"
                    ValidationExpression="\d{17}[\d|X]|\d{15}" Enabled="False"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr runat="server" id="ShowQQ">
            <td class="OrderTitle">
                QQ：
            </td>
            <td>
                <asp:TextBox ID="OICQ" runat="server" Width="132px" Height="16px" MaxLength="50" />
                <span style="color: Gray;">填写后将会在商品页面显示QQ联系</span>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="OICQ"
                    ErrorMessage="格式错误" ValidationExpression="^[1-9]*[1-9][0-9]*$" 
                    Enabled="False"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr runat="server" id="Tr1" style="display:none;">
            <td class="OrderTitle">
                Skype：
            </td>
            <td >
                <asp:TextBox ID="Skype" runat="server" Width="132px" Height="16px" MaxLength="50"/>
                <span style="color: Gray;">填写后将会在商品页面显示Skype联系</span>
            </td>
        </tr>
        <tr runat="server" id="Tr2"  style="display:none;">
            <td class="OrderTitle">
                MSN：
            </td>
            <td>
                <asp:TextBox ID="Msn" runat="server" Width="132px" Height="16px" MaxLength="50" />
                <span style="color: Gray;">填写后将会在商品页面显示MSN联系</span>
            </td>
        </tr>
        <tr runat="server" id="Tr3"  style="display:none;">
            <td class="OrderTitle" >
                Yahoo：
            </td>
            <td >
                <asp:TextBox ID="Yahoo" runat="server" Width="132px" Height="16px" MaxLength="50" />
                <span style="color: Gray;">填写后将会在商品页面显示Yahoo联系</span>
            </td>
        </tr>
        <tr runat="server" id="ShowWW">
            <td class="OrderTitle">
                淘宝旺旺：
            </td>
            <td>
                <asp:TextBox ID="Taobaowangwang" runat="server" Width="132px" Height="16px" MaxLength="50" />
                <span style="color: Gray;">填写后将会在商品页面显示淘宝联系</span>
            </td>
        </tr>
        <tr>
            <td class="OrderTitle">
                认证状态：
            </td>
            <td>
                <asp:Image ID="IdentifyStatus" runat="server" onclick="javascript:IdentifyRedirect();"/>
                <asp:HyperLink ID="GoIdentify" runat="server" Target="../Credit/Identify_user.aspx" />
                <asp:Image ID="IdentifyPassStatus" runat="server"/>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center;">
                <asp:Button ID="btnsave" runat="server" Text="保存修改" CausesValidation="true" onclick="btnsave_Click" />
                <input type="button" value="取消返回" onclick="history.back()" name="cl" />
            </td>
        </tr>
    </table>
</asp:Content>
