<%@ Page Language="c#" AutoEventWireup="True" CodeBehind="PostStudent.aspx.cs" Inherits="MTCUN.Register.PostStudent"
    Title="学员报名-客服" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../UserCol/Dictionary.ascx" TagName="Dictionary" TagPrefix="uc1" %>
<%@ Register Src="../UserCol/SimpleCode.ascx" TagName="SimpleCode" TagPrefix="uc2" %>
<%@ Register Src="../UserCol/Ann.ascx" TagName="Ann" TagPrefix="uc3" %>
<%@ Register Src="../UserCol/FingerCode.ascx" TagName="FingerCode" TagPrefix="uc4" %>
<!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">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript" src="../../JScript/jsAddress.js"></script>
</head>
<script type="text/javascript">

    function DeleteImage() {
        if (__mt_editmode && __mt_photo) {
            var btnDel = document.getElementById("lbnDelete");
            btnDel.style.visibility = "visible";
            btnDel.style.width = "100%";
            btnDel.style.height = "100%";
        }
    }

    function ftp(evt) {
        document.getElementById("fileImage").click();
    }

    window.onload = function () {

        var cftp = document.getElementById('fileImage');
        if (cftp != null) {
            cftp.onchange = function (evt) {
                Preview(evt);
            }
        }

        __mt_addTableLeftCss('tb');
        _addressInit();
        __mt_CreateSubMenu(tb, divImage, 1, 10, 1);
    }

    function Preview(evt) {

        if (!window.FileReader) {
            var file = document.getElementById("fileImage");
            var cimgurl = document.getElementById("imgUrl");
            var preview = document.getElementById("__mt_Preview");

            if (file.value != "") {
                preview.height = 16;
                preview.src = file.value;
                preview.height = picheight;
                cimgurl.value = file.value;
            }

            return;
        }

        var files = evt.target.files;
        for (var i = 0, f; f = files[i]; i++) {
            if (!f.type.match('image.*')) {
                continue;
            }

            var reader = new FileReader();
            reader.onload = (function (theFile) {

                return function (e) {

                    var file = document.getElementById("fileImage");
                    var cimgurl = document.getElementById("imgUrl");
                    var preview = document.getElementById("__mt_Preview");

                    if (file.value != "") {
                        preview.height = 16;
                        preview.src = file.value;
                        preview.height = picheight;
                        cimgurl.value = file.value;
                        preview.src = e.target.result;
                    }
                };

            })(f);

            reader.readAsDataURL(f);
        }

    }

    function __mt_CallbackCamera(type, path, data) {
        var preview = document.getElementById("__mt_Preview");
        var _data = "data:image/jpeg;base64," + data;
        preview.src = _data;

        document.getElementById("imgUrl").value = path;
        document.getElementById("imgByteString").value = data;
    }

    function _addressInit() {
        if (__addressInit) {
            Init();
        }
    }

</script>

<body>
    <div class="printWeb">
        <iframe id="PickPanel" width="0" height="0"></iframe>
    </div>
    <form id="Form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="divpanel">
            <uc3:Ann ID="Ann1" runat="server" />
            <table class="table" cellspacing="0" id="tb">
                <tr>
                    <th colspan="3">学员报名
                    </th>
                </tr>
                <tr class="required" runat="server" id="tr_4">
                    <td>报名模板：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rblStudentType" runat="server" RepeatDirection="Horizontal" DataTextField="StuRoleName" DataValueField="StuRoleID"
                            AutoPostBack="True" OnSelectedIndexChanged="rblStudentType_SelectedIndexChanged">
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr runat="server" id="tr_0">
                    <td>选择相片：</td>
                    <td>
                        <div id="divImage" style="display: none">
                            <div style="position: relative; display: inline-block;">
                                <asp:Image ID="__mt_Preview" runat="server" ImageUrl='<%#accTheme("pic.gif") %>' onclick="DeleteImage()"></asp:Image>
                                <div style="text-align: center; position: absolute; bottom: 10px; right: 10px; width: 30px; height: 20px; z-index: 100;">
                                    <asp:LinkButton ID="lbnDelete" runat="server" OnClick="lbnDelete_Click" Style="visibility: hidden; background-color: gold; display: inline-block"
                                        CausesValidation="false">删除</asp:LinkButton>
                                </div>
                            </div>
                        </div>

                        <div style="margin-top: 10px">
                            <input id="fileImage" type="file" accept="Image/*" runat="server" />
                            <div class="inline_block tool_camera" onclick="Avicap();">
                            </div>
                        </div>

                        <div style="display: none">
                            <asp:HiddenField ID="imgByteString" runat="server" />
                            <asp:HiddenField ID="imgUrl" runat="server" />
                        </div>
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_1">
                    <td>学号：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxStudentID" runat="server" Enabled="False"></asp:TextBox>
                        <asp:CheckBox ID="cbxAutoID" runat="server" AutoPostBack="True"
                            Checked="True" OnCheckedChanged="cbxAutoID_CheckedChanged" Text="自动" />
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_2">
                    <td>姓名：
                    </td>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:TextBox ID="tbxStudentName" runat="server" OnTextChanged="tbxStudentName_TextChanged"
                                    AutoPostBack="True"></asp:TextBox>
                                <asp:HyperLink ID="hlkNameShow" runat="server" Visible="False" ForeColor="Red"></asp:HyperLink>
                                <asp:RequiredFieldValidator ID="__StudentName" runat="server" ControlToValidate="tbxStudentName" Display="None" ErrorMessage="请填写学员姓名。"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr runat="server" id="tr_3">
                    <td>拼音缩写：
                    </td>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <asp:TextBox ID="tbxPYSimple" runat="server"></asp:TextBox>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>

                <tr runat="server" id="tr_5">
                    <td>别名：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxByname" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_6">
                    <td>称呼：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxAppellation" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_7">
                    <td>性别：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rblSex" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0" Text="女"></asp:ListItem>
                            <asp:ListItem Value="1" Text="男"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>

                <tr runat="server" id="tr_8">
                    <td>出生：
                    </td>
                    <td>
                        <div class="inline_block">
                            <asp:TextBox ID="tbxBirthday" runat="server"></asp:TextBox>
                        </div>
                        <div class="inline_block">
                            <script type="text/javascript">Calendar("tbxBirthday");</script>
                        </div>
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_9">
                    <td>校区：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                        </asp:DropDownList>
                        <asp:CompareValidator ID="_ddlSchool" runat="server" ControlToValidate="ddlSchool"
                            ErrorMessage="请选择校区！" Display="None" Operator="NotEqual" ValueToCompare="0"></asp:CompareValidator>
                    </td>
                </tr>
                <tr runat="server" id="tr_10">
                    <td>密码：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxPassword" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_11">
                    <td>拥有积分：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxPoints" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_12">
                    <td>报名时间：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxDateAndTime" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="_tbxDateAndTime" runat="server" ErrorMessage="报名日期不能为空！"
                            ControlToValidate="tbxDateAndTime" Display="None"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server" id="tr_13">
                    <td>电话：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxTel" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_14">
                    <td style="height: 27px">手机：
                    </td>
                    <td style="height: 27px">
                        <asp:TextBox ID="tbxMobileTel" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="__tbxMobileTel" runat="server" ControlToValidate="tbxMobileTel" Display="None" ErrorMessage="请填写手机号。"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server" id="tr_15">
                    <td style="height: 26px">其它电话1：
                    </td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxTel1" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_16">
                    <td style="height: 26px">其它电话2：
                    </td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxTel2" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_17">
                    <td style="height: 26px">其它电话3：
                    </td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxTel3" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_18">
                    <td style="height: 26px">QQ：
                    </td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxQQ" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_19">
                    <td style="height: 26px">微信号：</td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxWeiXin" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_20">
                    <td style="height: 26px">电子邮箱：
                    </td>
                    <td style="height: 26px">
                        <asp:TextBox ID="tbxEmail" runat="server" Width="256px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_21">
                    <td>身高：</td>
                    <td>
                        <asp:TextBox ID="tbxHeight" runat="server"></asp:TextBox>CM
                    </td>
                </tr>
                <tr runat="server" id="tr_22">
                    <td>体重：</td>
                    <td>
                        <asp:TextBox ID="tbxWeight" runat="server"></asp:TextBox>Kg
                    </td>
                </tr>
                <tr runat="server" id="tr_23">
                    <td>家庭地址：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxHomeAddress" runat="server" Width="338px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_24">
                    <td>国家：</td>
                    <td>
                        <asp:TextBox ID="tbxCountry" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_25">
                    <td>民族：</td>
                    <td>
                        <asp:TextBox ID="tbxNation" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_26">
                    <td>省份：</td>
                    <td>
                        <%--                                <asp:DropDownList ID="ddlProvince1" runat="server" EnableViewState="false">
                                </asp:DropDownList>--%>
                        <select id="ddlProvince" runat="server" enableviewstate="false"></select>
                    </td>
                </tr>
                <tr runat="server" id="tr_27">
                    <td>城市：</td>
                    <td>
                        <%--                                <asp:DropDownList ID="ddlCity1" runat="server" EnableViewState="false">
                                </asp:DropDownList>--%>
                        <select id="ddlCity" runat="server" enableviewstate="false"></select>
                    </td>
                </tr>
                <tr runat="server" id="tr_28">
                    <td>区县：</td>
                    <td>
                        <%--                                <asp:DropDownList ID="ddlArea1" runat="server" EnableViewState="false">
                                </asp:DropDownList>--%>
                        <select id="ddlArea" runat="server" enableviewstate="false"></select>
                    </td>
                </tr>
                <tr runat="server" id="tr_29">
                    <td>街道：</td>
                    <td>
                        <asp:TextBox ID="tbxStreet" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_30">
                    <td>收件人：</td>
                    <td>
                        <asp:TextBox ID="tbxConsignee" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_31">
                    <td>收件人电话：</td>
                    <td>
                        <asp:TextBox ID="tbxConsigneePhone" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_32">
                    <td>邮编：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxPostCode" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_33">
                    <td>原学校：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxSchool" runat="server" Width="222px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_34">
                    <td>原年级：</td>
                    <td>
                        <asp:TextBox ID="tbxGrade" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_35">
                    <td>原班级：</td>
                    <td>
                        <asp:TextBox ID="tbxClass" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_36">
                    <td>工作单位：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCompany" runat="server" Width="225px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_37">
                    <td>工作职务：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxHeadship" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_38">
                    <td>学历：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxDiploma" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_39">
                    <td>VIP到期时间：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxVIPLastDate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_40">
                    <td>父亲姓名：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxFatherName" runat="server" Width="89px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_41">
                    <td>父亲手机：</td>
                    <td>
                        <asp:TextBox ID="tbxFatherMobileTel" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_42">
                    <td>父亲单位：</td>
                    <td>
                        <asp:TextBox ID="tbxFatherUnit" runat="server" Width="230px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_43">
                    <td>父亲职务：</td>
                    <td>
                        <asp:TextBox ID="tbxFatherHeadship" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_44">
                    <td>母亲姓名：</td>
                    <td>
                        <asp:TextBox ID="tbxMotherName" runat="server" Width="91px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_45">
                    <td>母亲手机：</td>
                    <td>
                        <asp:TextBox ID="tbxMotherMobileTel" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_46">
                    <td>母亲单位：</td>
                    <td>
                        <asp:TextBox ID="tbxMotherUnit" runat="server" Width="229px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_47">
                    <td>母亲职务：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxMotherHeadship" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="c1">
                    <td>
                        <asp:Label ID="labCustom1" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCustom1" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="c2">
                    <td>
                        <asp:Label ID="labCustom2" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCustom2" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="c3">
                    <td>
                        <asp:Label ID="labCustom3" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCustom3" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="c4">
                    <td>
                        <asp:Label ID="labCustom4" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCustom4" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="c5">
                    <td>
                        <asp:Label ID="labCustom5" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCustom5" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_48">
                    <td>身份证：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxIDcard" runat="server" Width="228px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_49">
                    <td>ID卡号：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxSignInID" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_50">
                    <td>接收考勤短信：
                    </td>
                    <td>
                        <asp:CheckBox ID="cbxSignInSMS" runat="server" Checked="True" />
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_51">
                    <td>咨询顾问：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlConsultant" runat="server" DataTextField="TrueName" DataValueField="UserID">
                        </asp:DropDownList>
                        <asp:CompareValidator ID="_ddlConsultant" runat="server" ControlToValidate="ddlConsultant"
                            ErrorMessage="请选择咨询顾问！" Operator="NotEqual" ValueToCompare="0" Display="None"></asp:CompareValidator>
                        <uc2:SimpleCode ID="SimpleCode1" runat="server" UsersControlID="ddlConsultant" />
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_52">
                    <td>来源媒体：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlMedia" runat="server" DataTextField="MediaName" DataValueField="MediaID">
                        </asp:DropDownList>
                        <asp:CompareValidator ID="_ddlMedia" runat="server" ControlToValidate="ddlMedia"
                            ErrorMessage="请选择获知广告方式！" Operator="NotEqual" Display="None" ValueToCompare="0"></asp:CompareValidator>
                    </td>
                </tr>
                <tr runat="server" id="tr_53">
                    <td>备注：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxRemark" runat="server" TextMode="MultiLine" Height="114px" Width="465px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_54">
                    <td>下次回访：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxNextReplyDate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="tr_55">
                    <td>指纹状态：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlFingerState" runat="server">
                            <asp:ListItem Value="0">禁用</asp:ListItem>
                            <asp:ListItem Selected="True" Value="1">可用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr runat="server" id="tr_56">
                    <td>指纹模板：
                    </td>
                    <td>
                        <uc4:FingerCode ID="tbxFingerCode" runat="server" />
                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_57">
                    <td>录入员：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlUser" runat="server" DataTextField="TrueName" DataValueField="UserID">
                        </asp:DropDownList>
                        <asp:CompareValidator ID="_ddlUser" runat="server" ControlToValidate="ddlUser" ErrorMessage="录入员不能为空！" Display="None"
                            Operator="NotEqual" ValueToCompare="0" SetFocusOnError="true"></asp:CompareValidator>

                    </td>
                </tr>
                <tr class="required" runat="server" id="tr_58">
                    <td>状态：</td>
                    <td>
                        <asp:DropDownList ID="ddlLockState" runat="server">
                            <asp:ListItem Value="0">毕业</asp:ListItem>
                            <asp:ListItem Selected="True" Value="1">正常</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <label class="lab_button">
                            <asp:Button ID="btnPost" runat="server" Text="提交" OnClick="btnPost_Click"></asp:Button>
                        </label>
                        <label class="lab_button" id="__mt_labBack" runat="server">
                            <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                        </label>
                    </td>
                </tr>
            </table>
        </div>

        <asp:ValidationSummary ID="vsyMsgs" runat="server" CssClass="vsy" />


        <!------usercol ajax-------->
        <asp:UpdatePanel ID="up" runat="server">
            <ContentTemplate>
                <uc1:Dictionary ID="Dictionary1" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <!-------usercol ajax------->

        <div class="divremark">
            <b>注意事项：</b><br />
            <br />
            1、请将当前站点加入“信任网站”才能显示本地图片。<br />
            2、添加“信任网站”路径：IE浏览器，工具，Internet选项，安全，信任站点，站点，添加。<br />
        </div>
    </form>
</body>
</html>
