<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    ValidateRequest="false" CodeBehind="Account.aspx.cs" Inherits="PowerEasy.Module.Promotion.WebSite.Admin.Promotion.Account"
    Title="修改推广会员信息" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="server">
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="2" class="spacingtitle">
                修改推广会员信息 
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right" style="width: 28%">
                <strong>银行：</strong>
            </td>
            <td>
                <asp:TextBox ID="TxtBankName" runat="server" Width="220px" MaxLength="20" />
                <pe:RequiredFieldValidator ID="ValrBankShortName" runat="server" ControlToValidate="TxtBankName"
                    ErrorMessage="账户名称不能为空！" SetFocusOnError="true" Display="Dynamic" />
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right">
                <strong>开户行：</strong>
            </td>
            <td>
                <asp:TextBox ID="TxtOpeningBank" runat="server" Width="220px" MaxLength="50" />
                <pe:RequiredFieldValidator ID="ValrBankName" runat="server" ControlToValidate="TxtOpeningBank"
                    ErrorMessage="开户行不能为空！" SetFocusOnError="true" Display="Dynamic" />
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right">
                <strong>户名：</strong>
            </td>
            <td>
                <asp:TextBox ID="TxtHolderName" runat="server" Width="220px" MaxLength="20" />
                <pe:RequiredFieldValidator ID="ValrHolderName" runat="server" ControlToValidate="TxtHolderName"
                    ErrorMessage="户名不能为空" SetFocusOnError="true" Display="Dynamic" />
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right">
                <strong>账户：</strong>
            </td>
            <td>
                <asp:TextBox ID="TxtAccount" runat="server" Width="220px" MaxLength="30" />
                <asp:CustomValidator ID="ValxAccounts" ClientValidationFunction="ValxAccounts_ClientValidate"
                    Display="dynamic" ValidateEmptyText="true" SetFocusOnError="true" runat="server"
                    ErrorMessage="至少要输入帐号和卡号的其中一个" OnServerValidate="ValxAccounts_ServerValidate"
                    ControlToValidate="TxtAccount" />
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right">
                <strong>卡号：</strong>
            </td>
            <td>
                <asp:TextBox ID="TxtCardNum" runat="server" Width="220px" MaxLength="30" />
            </td>
        </tr>
        <tr class="tdbgbottom">
            <td colspan="2">
                <asp:Button ID="BtnUpdate" runat="server" Text="提交修改" OnClick="BtnUpdate_Click" />
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
        function ValxAccounts_ClientValidate(s,e)
        {
            var accounts = document.getElementById('<%=TxtAccount.ClientID %>').value;
            var cardNum = document.getElementById('<%=TxtCardNum.ClientID %>').value;
            if(accounts == "" && cardNum == "")
            {
                e.IsValid = false;
            }
            else
            {
                e.IsValid = true;
            }
        }
       
    </script>

    <asp:HiddenField ID="HdnId" runat="server" />
</asp:Content>
