<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetPlanUserStatistics.aspx.cs"  
    Inherits="RM.Web.Training.DataStatistics.GetPlanUserStatistics" EnableEventValidation="false" %>

<%@ Register Src="~/UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ 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>content</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/DatePicker/WdatePicker.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>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_List_Title")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: left; float:left;">
            选择培训计划:
            <select id="Planlist" runat="server">
            </select>
            选择起止时间:
            <input id="start" type="text" onclick="WdatePicker()" value="" runat="server" />&nbsp;&nbsp;
            --&nbsp;&nbsp;<input id="end" type="text" onclick="WdatePicker()" value="" runat="server" />
            地区筛选:
            <asp:DropDownList ID="Province" runat="server">
            </asp:DropDownList>
            <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" />
            <asp:Button ID="planbutton" Text="确定" runat="server" OnClick="planbutton_Click" />
             <input type="button" onclick="Daochu()" value="导出" />
        </div>
        
    </div>
    <div class="div-body">
        <table class="grid" id="table1" cellspacing="0" cellpadding="0" border="0" data-graph-type="column"
            data-graph-container="#container">
            <thead>
                <tr>
                    <th>
                        姓名
                    </th>
                    <th>
                        登录名
                    </th>
                    <th>
                        已学学分
                    </th>
                    <th>
                        考试次数
                    </th>
                    <th>
                        联系电话
                    </th>
                    <th>
                        省份
                    </th>
                    <th>
                        市区
                    </th>
                    <th>
                        城市
                    </th>
                    <th>
                        通过
                    </th>
                </tr>
            </thead>
            <tbody>
                <%=TableHtml %>
            </tbody>
        </table>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 121);
            addressInit('Province', 'City', 'Area', '<%=ProvinceStr %>', '<%=CityStr %>', '<%=AreaStr %>');
        })
        //导出
        function Daochu() {

            var html = "<table border=1>" + $("#table1").html() + "</table>";
            post('/RMBase/SysWindows/WindowsExport.ashx', { ExportType: "not", ExportHTML: html, TableName: "result" });
            GoTableExport("not", "table1");
        }

        //提交数据，下载导出文件
        function post(URL, PARAMS) {
            var temp = document.createElement("form");
            temp.action = URL;
            temp.method = "post";
            temp.style.display = "none";
            for (var x in PARAMS) {
                var opt = document.createElement("textarea");
                opt.name = x;
                opt.value = PARAMS[x];
                //alert(opt.name);      
                temp.appendChild(opt);
            }
            document.body.appendChild(temp);
            temp.submit();
            return temp;
        }
    </script>
</body>
</html>
