<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true"
    Codebehind="MemberAdd.aspx.cs" Inherits="PPFOR.Admin.UserInfo.MemberAdd" Title="添加会员" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script type="text/javascript">
function checkIsDegreeSeleted(source,args)
{
    args.IsValid=args.Value>0;
}
</script>
<form id="form1" runat="server">        
    <table width="100%" cellpadding="0" cellspacing="0" border="0" class="fortable">
    <thead>
    <tr>
        <td colspan="2">添加会员</td>
    </tr>
    </thead> 
    <tr>
        <td style="width: 15%" align="right">会员账号：</td>
        <td>
            <asp:TextBox ID="PPFOR_memberName" runat="server" MaxLength="20" Width="150px"></asp:TextBox>   
             <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" SetFocusOnError="true" ValidationExpression="^[A-Za-z0-9\u4e00-\u9fa5]{3,20}$" Display="Dynamic" ControlToValidate="PPFOR_memberName"><br />会员账号不能包含特殊字符（如@，#，$，%，^，&amp;，*，(，)，'，?，{，}，[，]，;，:等），<br />会员账号长度必须在3-20个字符之间！</asp:RegularExpressionValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_memberName"><br />会员账号不能为空</asp:RequiredFieldValidator>                  
        </td>
    </tr>
    <tr>
        <td align="right">电子邮箱：</td>
        <td>
            <asp:TextBox ID="PPFOR_memberEmail" runat="server" Width="150px" MaxLength="100"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" Display="Dynamic" SetFocusOnError="true" ControlToValidate="PPFOR_memberEmail" ValidationExpression="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"><br />电子邮箱地址格式不对</asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_memberEmail"><br />电子邮箱地址不能为空</asp:RequiredFieldValidator>                  
        </td>
    </tr>       
    <tr>
        <td align="right">会员密码：</td>
        <td>
            <asp:TextBox ID="PPFOR_memberPassword" runat="server" TextMode="Password" Maxlength="20" Width="150px"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" SetFocusOnError="true" ValidationExpression="^[^\u4e00-\u9fa5]{6,20}$" Display="Dynamic" ControlToValidate="PPFOR_memberPassword"><br />会员密码长度必须在6-20个字符之间，密码不能使用中文字符</asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_memberPassword"><br />会员密码不能为空</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
          <td align="right">确认密码：</td>
          <td><asp:TextBox ID="PPFOR_confirmMemberPassword" runat="server" TextMode="Password" Maxlength="20" Width="150px"></asp:TextBox>
              <asp:CompareValidator ID="CompareValidator1" ControlToCompare="PPFOR_memberPassword" ControlToValidate="PPFOR_confirmMemberPassword" runat="server" SetFocusOnError="true" Display="Dynamic"><br />两次密码输入不一致</asp:CompareValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"  Display="Dynamic" SetFocusOnError="true" ControlToValidate="PPFOR_confirmMemberPassword"><br />确认密码不能为空</asp:RequiredFieldValidator>  
          </td>
    </tr> 
    <tr>
        <td align="right">会员等级：</td>
        <td>
           <asp:DropDownList ID="PPFOR_memberDegreeList" runat="server" Width="150px">
           <asp:ListItem Value="0" Text="--选择会员等级--"></asp:ListItem>
           </asp:DropDownList>            
            <asp:CustomValidator ID="CustomValidator1" ClientValidationFunction="checkIsDegreeSeleted" ControlToValidate="PPFOR_memberDegreeList" runat="server" Display="Dynamic" SetFocusOnError="true"><br />必须选择会员等级</asp:CustomValidator>
        </td>
    </tr>          
    <tr>
        <td align="right">会员状态：</td>
        <td>
           <asp:RadioButtonList ID="PPFOR_isLocked" CssClass="innertable" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Text="正常" Value="0" Selected="True"></asp:ListItem>
            <asp:ListItem Text="锁定" Value="1"></asp:ListItem>            
          </asp:RadioButtonList>
        </td>
    </tr> 
    <tr>
        <td align="right">会员备注：</td>
        <td align="center">
           <asp:TextBox ID="PPFOR_memberDetail" TextMode="MultiLine" Height="240px" Width="98%" runat="server"></asp:TextBox>
        </td>
    </tr>          
    <tr>
        <td align="center" colspan="2" style="display:none">
            <asp:Button ID="PPFOR_addMember" CssClass="inputbutton" runat="server" Text="添加" Width="100px" OnClick="PPFOR_addMemberClick" />
            <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" />
                <script type="text/javascript">
                    addButtonArray("<%= PPFOR_addMember.ClientID %>","reset1");
                </script>
        </td>
    </tr>
    </table>
</form>
</asp:Content>
