<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="member_register_allfresh.aspx.cs" Inherits="VA.Modules.JTongMember.member.member_register_allfresh" %>

<!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 runat="server">
    <title></title>
    <!--#include virtual="/include/css/edit.aspx"-->
    <!--#include virtual="/include/js/edit.aspx"-->     
    <script type="text/javascript">

    //在选中一项前；
    function JTongSmartDropDownList_BeforeTakeValue(JTongSmartDropDownList_inputObjID, selectedRow) {
        if (selectedRow != null) {
            if (JTongSmartDropDownList_inputObjID == "txtIntroducer") {
                var memberID = selectedRow.cells[0].innerHTML;
                var memberName = selectedRow.cells[1].innerHTML;
                var cardNo = selectedRow.cells[2].innerHTML; //会员卡号；

                if (cardNo == $.trim(document.getElementById("txtCardNo").value)) {
                    alert("推荐人不能是会员自己！");
                    $("#txtIntroducer").focus();
                    return false;
                }
            }
        }

        //返回true，继续取值；返回false，取消取值；
        return true;
    }

    //选择一项后；
    function JTongSmartDropDownList_AfterTakeValue(JTongSmartDropDownList_inputObjID, selectedRow) {
        if (JTongSmartDropDownList_inputObjID == "txtIntroducer") {
            var memberID = selectedRow.cells[0].innerHTML;
            var memberName = selectedRow.cells[1].innerHTML;
            var cardNo = selectedRow.cells[2].innerHTML; //会员卡号；
            
            document.getElementById("txtIntroducer_cardNo").value = cardNo;
            $("#txtSalesman").focus();
        }
    }

    //显示操作结果；
    function showActResult(sMsg) {
        sMsg = sMsg.replace("'", "’");
        JTongAlert('操作结果', sMsg, 'info');
        window.parent.reload();
    }

    $(function () {
        $("#txtName").focus();
        $("#txtMobile").keyup(function (event) {
            $("#txtCardNo").val($(this).val());
        });
    });

    </script>

    <style type="text/css">  
    .editTable .th{
        width:100px;
    }
    </style>
</head>
<body>
<form id="Form1" method="post" runat="server">


<!--

该示例着重演示使用asp.net自带的验证控件进行输入验证。

-->

<div class="editPageWrapper">

<div class="formTitle">
   <h1>会员登记</h1>
</div>

<br />

<table cellspacing="0" cellpadding="3" class="editTable">
<tr id="trEditResult" runat="server" visible="false">
<td colspan="2" style="text-align:center;">
    <div class="editResult">
    <asp:Literal id="litEditResult" runat="server" />
    </div>
</td>
</tr>
<tr>
<td class="th">姓名(<span class="note mustfill">*</span>)：</td>
<td>              
    <VACTL:TextBox ID="txtName" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="100px"
            CanBeNull="No"
            FieldName="姓名" />        
</td>
</tr>
<tr>
<td class="th">性别：</td>
<td>
    <asp:DropDownList ID="ddlSex" Runat="server" Width="104px" >
    <asp:ListItem Value="男">男</asp:ListItem>
    <asp:ListItem Value="女">女</asp:ListItem>    
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">出生日期：</td>
<td>
    <VACTL:TextBox ID="txtBirthDate" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="100px"
            FieldName="出生日期"
            RequiredFieldType="Date"
            HintInfo="如：2015-02-01" />
    <img onclick="WdatePicker({el:'txtBirthDate'})" src="/app_themes/default/images/icons/ico_datepicker.gif" align="absmiddle">
</td>
</tr>
<tr>
<td class="th">手机(<span class="note mustfill">*</span>)：</td>
<td>
    <VACTL:TextBox ID="txtMobile" runat="server"
            EnableViewState="False"
		    CssClass="input"
            Width="100px"
            CanBeNull="No"
            FieldName="手机"
            RequiredFieldType="Mobile"
            HintInfo="如：13073788830" /> 
</td>
</tr>
<tr>
<td class="th">Email：</td>
<td>
   <VACTL:TextBox ID="txtEmail" runat="server"
            EnableViewState="False"
		    CssClass="input"
            Width="100px"
            FieldName="Email"
            RequiredFieldType="Email" /> 
            
</td>
</tr>
<tr>
<td class="th">会员等级：</td>
<td>
    <asp:DropDownList ID="ddlMemberLevel" Runat="server" Width="104px" >    
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">会员卡号(<span class="note mustfill">*</span>)：</td>
<td>
    <VACTL:TextBox ID="txtCardNo" runat="server"
            EnableViewState="False"
		    CssClass="input"
            Width="100px"
            CanBeNull="No"
            FieldName="会员卡号"
            /> 
</td>
</tr>
<tr>
<td class="th">推荐人：</td>
<td>
    <asp:TextBox runat="server" ID="txtIntroducer" 
            CssClass="input" 
            onfocus="JTongSmartDropDownList_OnfocusHandler(this, 'smartdropdownlist_datasrc/get_members.aspx',true,false,400,220);"
            Width="100px" />
    <asp:HiddenField runat="server" id="txtIntroducer_hiddenValue" />
    <asp:HiddenField runat="server" id="txtIntroducer_cardNo" />
</td>
</tr>
<tr>
<td class="th">客户经理：</td>
<td>
    <asp:TextBox runat="server" ID="txtSalesman" 
            CssClass="input" 
            onfocus="JTongSmartDropDownList_OnfocusHandler(this, 'smartdropdownlist_datasrc/get_employees.aspx',true,false,400,220);"
            Width="100px" />
    <asp:HiddenField runat="server" id="txtSalesman_hiddenValue" />
</td>
</tr>
<tr>
<td class="th">身份证号：</td>
<td>
    <VACTL:TextBox ID="txtIDCardNo" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="200px"
            FieldName="身份证号"
            RequiredFieldType="IDCardNum"
            MaxLength="18"
            />
</td>
</tr>
<tr>
<td class="th">联系地址：</td>
<td>
    <VACTL:TextBox ID="txtAddress" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="200px"
            FieldName="地址" />
</td>
</tr>
<tr>
<td class="th">备注：</td>
<td>    
	<VACTL:TextBox ID="txtRemark" Runat="server"
		 EnableViewState="False"
		 CssClass="input"
         TextMode="MultiLine"
		 MaxLength="100" 
         Width="400px"
         CanBeNull="Yes" />	
</td>
</tr>

<tr>
<td class="th"></td>
<td>
    <asp:Button ID="btnSubmit" Runat="server" Text=" 保存 " CssClass="btn" 
        Width="100px" onclick="btnSubmit_Click" />
    <asp:Label ID="lblResult" Runat="server" EnableViewState="False"></asp:Label>
    
    <VACTL:Hint ID="Hint1" runat="server" HintImageUrl="/app_themes/default/images/textbox" />
    <VACTL:ValidationSummary ID="ValidationSummary1" runat="server"
            DisplayMode="List"
            EnableClientScript="true" />
    
    <!--注意：这个文件一定要放到页面底部，以便覆盖asp.net验证脚本中的同名函数-->
    <script type="text/javascript" src="/scripts/utils/aspnet_validator_extend.js"></script>
</td>
</tr>
</table>

<!--每个页面上只能有一个该控件实例-->
<VACTL:SmartDropDownList ID="SmartDropDownList1" runat="server"></VACTL:SmartDropDownList>  

</div><!--editPageWrapper.END-->

</form>
</body>
</html>

