<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudetnUser_Form.aspx.cs"
    Inherits="RM.Web.Member.User.StudetnUser_Form"  EnableEventValidation="false" %>
        
<!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 id="Head1" runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Form")%></title>
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no" />-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />

    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/Validator/JValidator.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/TreeTable/jquery.treeTable.js" type="text/javascript"></script>
    <link href="/Themes/Scripts/TreeTable/css/jquery.treeTable.css" rel="stylesheet"
        type="text/css" />
    <link href="/Themes/Scripts/TreeView/treeview.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/TreeView/treeview.pack.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jsAddress.js" type="text/javascript"></script>
    <script type="text/javascript">
        //初始化
        $(function () {
            Setform();
            
            $('#table2').hide();
            ChekOrgClick();
          
        })
        //点击切换面板
        var IsFixedTableLoad = 1;
        function panel(obj) {
            if (obj == 1) {
                $('#table1').show();
                $('#table2').hide();
                $('#table3').hide();

            } else if (obj == 2) {
                $('#table1').hide();
                $("#table2").show();
                $('#table3').hide();
            } else if (obj == 3) {
                $('#table1').hide();
                $("#table2").hide();
                $('#table3').show();
            }
        }
        //附加信息表单赋值
        function Setform() {
                var strArray = new Array();
                var strArray1 = new Array();
                var item_value = $("#AppendProperty_value").val(); //后台返回值
                strArray = item_value.split(';');
                for (var i = 0; i < strArray.length; i++) {
                    var item_value1 = strArray[i];
                    strArray1 = item_value1.split('|');
                    $("#" + strArray1[0]).val(strArray1[1]);
                }
        }
        //获取表单值
        function CheckValid() {
            if (!CheckDataValid('#form1')) {
                return false;
            }
            var item_value = '';
            $("#AppendProperty_value").empty;
            $("#table2 tr").each(function (r) {
                $(this).find('td').each(function (i) {
                    var pk_id = $(this).find('input,select').attr('id');
                    if ($(this).find('input,select').val() != "" && $(this).find('input,select').val() != "==<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("plaese_sel")%>==" && $(this).find('input,select').val() != undefined) {
                        item_value += pk_id + "|" + $(this).find('input,select').val() + ";";
                    }
                });
            });
            $("#AppendProperty_value").val(item_value);
            $("#checkbox_value").val(CheckboxValue())
            if (!confirm('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("AllotAuthority_Form_save")%>')) {
                return false;
            }
        }
        //验证所属部门必填
        var ChekOrgVale = "";
        function ChekOrgClick() {
            var pk_id = GetQuery('key');
            if (IsNullOrEmpty(pk_id)) {
                ChekOrgVale = 1;
            }
            $("#table3 [type = checkbox]").click(function () {
                ChekOrgVale = "";
                if ($(this).val() != "") {
                    if ($(this).attr("checked") == "checked") {
                        ChekOrgVale = 1;
                    };
                }
            })
        }
    </script>
    <style type="text/css">
    html, body{ height:auto; overflow:auto;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <%-- 所有打勾复选框值--%>
    <input id="checkbox_value" type="hidden" runat="server" />
    <%--获取附加信息值--%>
    <input id="AppendProperty_value" type="hidden" runat="server" />
    <div class="frmtop">
        <table style="padding: 0px; margin: 0px;" cellpadding="0" cellspacing="0">
            <tr>
                <td id="menutab" style="vertical-align: bottom;">
                    <div id="tab0" class="Tabsel" onclick="GetTabClick(this);panel(1)">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Jbxx")%></div>
                    <div id="tab1" class="Tabremovesel" onclick="GetTabClick(this);panel(2);">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Fjxx")%></div>
                    <div id="tab2" class="Tabremovesel" onclick="GetTabClick(this);panel(3);">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Photo")%></div>
                </td>
            </tr>
        </table>
    </div>
    <div class="div-frm">
        <%--基本信息--%>
        <table id="table1" border="0" cellpadding="0" cellspacing="0" class="frm">
            <tr>
                <th>
                   <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Student_No")%>:
                </th>
                <td>
                    <input id="User_Code" runat="server" type="text" class="txt"  err="职工工号"
                        style="width: 200px" readonly="readonly" value="" />
                </td>
            </tr>
            <tr>
                <th>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Name")%> :
                </th>
                <td>
                    <input id="User_Name" runat="server" type="text" class="txt" datacol="yes" err="职工姓名"
                        checkexpession="NotNull" style="width: 200px" />
                </td>
            </tr>
            <tr>
                <th>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Sex")%> :
                </th>
                <td>
                    <select id="User_Sex" class="select" runat="server" style="width: 206px">
                        <option value="1"> 男</option>
                        <option value="0"> 女</option>
                    </select>
                </td>
            </tr><tr>
                <th style="display:none">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Js")%>:
                </th>
                <td style="display:none">
                    <input id="User_RoleType" runat="server" type="text" class="txt" datacol="yes" err="学生"
                        checkexpession="NotNull" style="width: 200px" readonly="readonly" value="学生" />
                </td>
            </tr>
            <tr>
                <th style="display:none">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Accout")%>:
                </th>
                <td style="display:none">
                    <input id="User_Account" runat="server" type="text" class="txt" datacol="yes" err="登录账户"
                        checkexpession="NotNull" style="width: 200px" readonly="readonly" />
                </td>
                <th style="display:none">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Pwd")%> :
                </th>
                <td style="display:none">
                    <input id="User_w" runat="server" type="text" class="txt" err="登录密码"
                         style="width: 200px" />
                </td>
            </tr>
              <tr>
                <th>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("question_lxdh")%>  :
                </th>
                <td>
                    <input id="Phone" runat="server" type="text" class="txt" datacol="yes" err="联系电话"
                        checkexpession="Null" style="width: 200px" />
                </td>
           </tr>

               <tr>
            <th><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("user_area")%>:</th><td>                               
                <select id="Province" runat="server"></select>　
                <select id="City" runat="server"></select>　<select id="Area" runat="server"></select>
                <input type="text" style="display:none;"  id="txtProvince" runat="server" />
                <input type="text" style="display:none;" id="txtCity" runat="server" />
                <input type="text" style="display:none;" id="txtArea" runat="server" />
</td>
            </tr>

            <tr>
                <th>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Email")%>  :
                </th>
                <td>
                    <input id="Email" runat="server" type="text" class="txt" datacol="yes" err="电子邮箱"
                        checkexpession="EmailOrNull" style="width: 200px" />
                </td>
           </tr>
           <tr>
                <th>
                   <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_CreatDate")%>:
                </th>
                <td>
                    <input id="CreateDate" disabled runat="server" type="text" class="txt" style="width: 200px"
                        readonly="readonly" />
                </td>
            </tr>
            <tr>
                <th style="display: none;">
                     <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CreateUser")%>:
                </th>
                <td style="display: none;">
                    <input id="CreateUserName" disabled runat="server" type="text" class="txt" style="width: 200px"
                        readonly="readonly" />
                </td>
                <th style="display: none;">
                     <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Title")%>:
                </th>
                <td style="display: none;">
                    <input id="Title" runat="server" type="text" class="txt" style="width: 200px" value="学生"
                        readonly="readonly" />
                </td>
            </tr>
            <tr>
                <th>
                     <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Certificate_Remarks")%>:
                </th>
                <td colspan="3">
                    <textarea id="User_Remark" class="txtRemark" runat="server" style="width: 552px;
                        height: 83px;"></textarea>
                </td>
            </tr>
        </table>
        <%--附加信息--%>
        <table id="table2" border="0" cellpadding="0" cellspacing="0" class="frm">
            <%=str_OutputHtml.ToString()%>
        </table>
        <%--相片--%>
        <table id="table3" border="0" cellpadding="0" cellspacing="0" class="frm" style="display: none;">
            <tr>
                <th>
                     <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ranking_Form_pic")%>
                </th>
                <td colspan="3" style="border: 1px #ccc solid;">
                    <img src="/Mall/User_Image.ashx?id=<%=_key %>" width="200"  id="Img1" />
                </td>
            </tr>
            
            <tr>
                <th>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ques_uploadImg")%>
                </th>
                <td colspan="3" style="border: 1px #ccc solid;">
                    <asp:FileUpload ID="FileUpload1" runat="server" Style="width: 252px;" />
                </td>
            </tr>
        </table>
    </div>
    <div class="frmbottom" style="margin-bottom:60px;">
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return CheckValid();"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/disk.png" alt="" /> <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Save")%></span></asp:LinkButton>
        <a class="l-btn" href="javascript:void(0)" onclick="OpenClose();"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Close")%></span></a>
    </div>
    </form>
     <script type="text/javascript">
         $("#User_RoleType").val("3");
         addressInit('Province', 'City', 'Area', '<%=ProvinceStr %>', '<%=CityStr %>', '<%=AreaStr %>');
    </script>
</body>
</html>
