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

<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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("Plan_pxjhbb")%></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.source.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <style type="text/css" id="style1">
        a { color: Blue; }
        td { text-align: center; }
        h2 { color: Blue; }
        h1 { text-align: center; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_pxjh")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_zongtqkbb")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body" id="div-body" style="margin: 0 10px; border: 0;">
        <h2><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Jbxx")%></h2>            

        <%=panbase %>
        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_sjpxzrs")%>：<span id="sum">0</span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Teach_pop")%> <span id="sumloading"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_laodjs")%></span>
        <h2><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_learncour")%></h2>
        <table id="table1" class="example" style="background-color: White;">
            <thead>
                <tr>
                    <td style="width: 250px; height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_courname")%>
                    </td>
                    <td style="height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Credit_Form_xuefen")%>
                    </td>
                    <td style="height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_learnType")%>
                    </td>
                    <td style="height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_xueshi")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <%=gecslist %>
            </tbody>
        </table>
        <h2><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_cyrenyuan")%></h2>
        <table id="table2" class="example" style="background-color: White;">
            <thead>
                <tr>
                    <td style="width: 250px; height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_guishu")%>
                    </td>
                    <td style="height: 16px; line-height: 16px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_canyu")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <%=getuserlist %>
            </tbody>
        </table>
        <h2><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_rymingdan")%></h2>
        <table id="table3" class="example">
            <thead>
                <tr>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_yangongNo")%>
                    </td>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_useraccount")%>
                    </td>
                    <td>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Name")%>                        
                    </td>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_usertype")%>
                    </td>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    </form>
    <script src="/Themes/Scripts/LodopFuncs.js" type="text/javascript"></script>
    <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
        height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"></embed>
    </object>
    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(60);
            //加载用户列表
            $.get("/Training/plan/GetPlan_UserList.ashx",
                { Key: QueryString("key") },
                function (data) {
                    var dataObj = eval("(" + data + ")"); //转换为json对象 
                    $("#sum").html(parseInt($("#sum").html()) + dataObj.length);
                    $.each(dataObj, function (i, item) {
                        $("#table3 tbody").append("<tr><td>" + item.User_Code + "</td><td>" + item.User_Account + "</td><td>" + item.User_Name + "</td><td>'<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_neiuser")%>'</td></tr>");
                    });
                });
            //加载外部
            $.get("/Training/plan/GetPlan_UserList.ashx",
                { Key: QueryString("key"), Type: "wai" },
                function (data) {
                    if (data && data != "-1") {
                        //外部没有加载成功
                        var dataObj = eval("(" + data + ")"); //转换为json对象 
                        $("#sum").html(parseInt($("#sum").html()) + dataObj.openuser.length);
                        $.each(dataObj.openuser, function (i, item) {
                            $("#table3 tbody").append("<tr><td>" + item.USER_CODE + "</td><td>" + item.USER_ACCOUNT + "</td><td>" + item.USER_NAME + "</td><td>'<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_waiuser")%>'</td></tr>");
                        });
                    }
                    $("#sumloading").text("").hide();
                });
        });
        //打印
        var LODOP; //声明为全局变量 
        function printer() {
            CreateOneFormPage();
            LODOP.PREVIEW();
        }
        function CreateOneFormPage() {
            LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INIT('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_pxjhbb")%>');
            LODOP.SET_PRINT_STYLE("FontSize", 18);
            LODOP.SET_PRINT_STYLE("Bold", 1);
            LODOP.ADD_PRINT_TEXT(50, 231, 360, 59, '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_printweb")%>');
            var strStyleCSS = "<link href='/Themes/Styles/Site.css' type='text/css' rel='stylesheet'>";
            strStyleCSS += "<style>" + document.getElementById("style1").innerHTML + "</style>";
            var strBodyStyle = "<style>table{width:100%;border: 1 solid #000000;border-collapse:collapse }td {border: 1 solid #000000;border-collapse:collapse }</style>";
            LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', strStyleCSS + strBodyStyle + document.getElementById("div-body").innerHTML);
        };
    </script>
</body>
</html>
