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

<%@ 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("CoursewareType_Form_title")%>
    </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("CoursewareType_Form_title")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="float: left;">
        </div>
        <div style="text-align: right">
            <uc1:LoadButton ID="LoadButton1" runat="server" />
            <a href="javascript:GetTypeQs();" style="background-color: #92c656; border-radius: 3px;
                color: White; font-size: 9pt; transition: none 0s ease 0s; padding: 5px 20px;">
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_cxjstmsl")%></a>
            <a title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_zsjgyzdyfl")%>"
                href="http://tks.1039.cn/Training/Learn/LearnPC.aspx?Key=5ae0c4e9-b273-4647-a9ad-9388575412af"
                target="_blank" class="button green"><span class="icon-botton" style="background: url('/Themes/images/16/folder_film.png') no-repeat scroll 0px 4px;">
                </span>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_spbz")%></a>
        </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("CoursewareType_Form_kjgs")%>
                    </td>
                    <td style="padding-left: 20px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_stgs")%>
                    </td>
                    <td style="padding-left: 20px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SortIndex")%>
                    </td>
                    <%--<td style="padding-left: 20px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("MyExamPlan-km")%>
                    </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 Menu_Id = '';
        function GetClickTableValue() {
            $('table tr').not('#td').click(function () {
                $(this).find('td').each(function (i) {
                    if (i == 1) {
                        Menu_Id = $(this).text();
                    }
                });
            });
            $("#dnd-example").treeTable({
                initialState: "collapsed" //collapsed 收缩 expanded展开的
            });
        }
        //新增
        function add() {
            var url = "/Training/Courseware/CoursewareType_Form.aspx?FID=" + Menu_Id;
            top.openDialog(url, 'TKS_CoursewareType', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_title")%>  - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Add")%>', 450, 305, 50, 50);
        }
        //编辑
        function edit() {
            var key = Menu_Id;
            if (IsEditdata(key)) {
                var url = "/Training/Courseware/CoursewareType_Form.aspx?key=" + key;
                top.openDialog(url, 'TKS_CoursewareType', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CoursewareType_Form_title")%>  - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Edit")%>', 450, 305, 50, 50);
            }
        }
        //删除
        function Delete() {
            var key = Menu_Id;
            if (IsDelData(key)) {
        showConfirmMsg("删除此数据，子集数据将会一并删除并不恢复，确定删除吗？",function(){
                   var isExistparm = 'key=' + key;
                   getAjax("/Training/Courseware/CoursewareType_List_Del.ashx",isExistparm,function(rs){
                   if (rs>0) {
     showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CG")%>",2000,4);
                  window.location.reload();
}else {
     showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ass")%>",2000,4);
}
                   });
                 
       });
              
            }
        }
        //重新计算题目数量
       function GetTypeQs()
       {
       Loading(true);
       getAjax("GetTypeQs.ashx","",function(rs){
       if (rs==1) {
        Loading(false);
        showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CG")%>",2000,4);
       window.location.reload();
}
       });
       }
    </script>
</body>
</html>
