<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CertificateTypeList.aspx.cs"
    Inherits="RM.Web.Training.Certificate.CertificateTypeList" %>

<%@ Register Src="/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Classification management")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .folderCount { padding-left: 40px; color: #adadad; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Classification management")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="float: left;">
        </div>
        <div style="text-align: right">
            <uc1:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        <table class="example" id="dnd-example">
            <thead>
                <tr>
                    <td style="padding-left: 20px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CertificateType_Class")%>
                    </td>
                    <td style="display: none;">
                    </td>
                    <td style="padding-left: 20px;">
                       <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CertificateType_Include")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <%=TableTree_CoursewareType.ToString()%>
            </tbody>
        </table>
    </div>
    </form>
    <script src="/Themes/Scripts/jquery-1.8.2.min.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" />
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            divresize(63);
            //            FixedTableHeader("#dnd-example", $(window).height() - 91);
            GetClickTableValue();
        })
        /**
        获取table TD值
        主键ID
        column:列名
        **/
        var dataId = '';
        function GetClickTableValue() {
            $('table tr').not('#td').click(function () {
                $(this).find('td').each(function (i) {
                    if (i == 1) {
                        dataId = $(this).text();
                    }
                });
            });
            $("#dnd-example").treeTable({
                initialState: "collapsed" //collapsed 收缩 expanded展开的
            });
        }
        //新增
        function add() {
            //alert(Menu_Id);
            var url = "/Training/Certificate/CertificateTypeForm.aspx?FID=" + dataId;
            top.openDialog(url, 'certificateTypeAdd', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CertificateType_title")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Add")%>', 450, 180, 50, 50);
        }
        //编辑
        function edit() {
            var key = dataId;
            if (IsEditdata(key)) {
                var url = "/Training/Certificate/CertificateTypeForm.aspx?key=" + key;
                top.openDialog(url, 'certificateTypeEdit', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CertificateType_title")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Edit")%>', 450, 305, 50, 50);
            }
        }

        //删除
        function Delete() {
            var key = dataId;
            if (IsDelData(key)) {
                var isExistparm = 'action=IsExist&tableName=TKS_CertificateType&pkName=CertificateType_ParentId&pkVal=' + key;
                if (IsExist_Data('/Ajax/Common_Ajax.ashx', isExistparm) > 0) {
                    showWarningMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ass")%>");
                    return false;
                }
                var delparm = 'action=Virtualdelete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("WeiXinPage_List_zslxgl")%>&tableName=TKS_CertificateType&pkName=CertificateType_Id&pkVal=' + key;
                delConfig('/Ajax/Common_Ajax.ashx', delparm)
            }
        }
    </script>
</body>
</html>
