<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RegisterTo.aspx.cs" Inherits="RM.Web.Member.RegisterTo" %>

<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Member_userzcgs")%></title>
    <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>
</head>
<body>
    <form id="form1" runat="server">
    <input id="checkbox_value" type="hidden" runat="server" />
    <div class="frmtop">
        <table style="padding: 0px; margin: 0px; height: 100%;" cellpadding="0" cellspacing="0">
            <tr>
                <td id="menutab" style="vertical-align: bottom;">
    <div id="tab2" class="Tabremovesel" onclick="GetTabClick(this);panel(3);">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Role_Form_ssbm")%></div>
                    <div id="tab3" class="Tabremovesel" onclick="GetTabClick(this);panel(4);">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Role_Info_ssjc")%></div>
                    <div id="tab4" class="Tabremovesel" onclick="GetTabClick(this);panel(5);">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Role_Info_ssgzz")%></div>
    </td>
            </tr>
        </table>
    </div>
    <div class="div-frm" style="height: 275px;">
         <%--所属部门--%>
        <div id="table3">
            <div class="btnbartitle">
                <div>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Organization")%>
                </div>
            </div>
            <div class="div-body" style="height: 245px;">
                <ul class="strTree">
                    <%=strOrgHtml.ToString()%>
                </ul>
            </div>
        </div>
        <%--所属角色--%>
        <div id="table4" style=" display:none">
            <div class="btnbartitle">
                <div>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Role_Info_ssjc")%>
                </div>
            </div>
            <div class="div-body" style="height: 245px;">
                <ul class="strTree">
                    <%=strRoleHtml.ToString()%>
                </ul>
            </div>
        </div>
        <%--所属工作组--%>
        <div id="table5" style=" display:none">
            <div class="btnbartitle">
                <div>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserGroup")%>
                </div>
            </div>
            <div class="div-body" style="height: 245px;">
                <ul class="strTree">
                    <%=strUserGroupHtml.ToString()%>
                </ul>
            </div>
        </div>
    </div>
    <div class="frmbottom">
        <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>
    * <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Member_selUser")%>
    </form>
<script type="text/javascript">
        //初始化
        $(function () {
            //Setform();
            treeAttrCss();
            $('#table4').hide();
            $('#table5').hide();
            ChekOrgClick();
        })
        //点击切换面板
        var IsFixedTableLoad = 1;
        function panel(obj) {
            if (obj == 3) {
                $('#table3').show();
                $('#table4').hide();
                $('#table5').hide();
            } else if (obj == 4) {
                $('#table3').hide();
                $('#table4').show();
                $('#table5').hide();
            } else if (obj == 5) {
                $('#table3').hide();
                $('#table4').hide();
                $('#table5').show();
            }
        }
        //获取表单值
        function CheckValid() {
            if (!CheckDataValid('#form1')) {
                return false;
            }
            var 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>
</body>
</html>
