<%@ page language="C#" autoeventwireup="true" inherits="admin_Home, ALL" enableEventValidation="false" %>

<%@ Register Src="~/admin/MyHeader.ascx" TagPrefix="uc1" TagName="MyHeader" %>
<%@ Register Src="~/admin/MyFooter.ascx" TagPrefix="uc1" TagName="MyFooter" %>



<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>会议室预约系统</title>
    <link href="/control/plugin/bootstrap3/css/bootstrap.min.css" rel="stylesheet" />
    <script src="/control/js/jquery.js"></script>
    <link href="/user/css/style.css?v=2" rel="stylesheet" />
    <script src="/control/plugin/bootstrap3/js/bootstrap.min.js"></script>

    <script src="/control/plugin/Highcharts/Highcharts.js"></script>
    <script src="/control/plugin/Highcharts/exporting.js"></script>



</head>
<body>
    <uc1:MyHeader runat="server" ID="MyHeader" />
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 ">
                <ol class="breadcrumb">
                    <li>首页</li>
                    <li>欢迎使用会议室预约系统</li>
                </ol>
            </div>
        </div>
        <div class="row">
            <div class="col-md-7">

                <div id="container" style="height:<%=ch%>px"></div>

                <script type="text/javascript">
                    $(function () {
                        $('#container').highcharts({
                            chart: {
                                type: 'bar'
                            },
                            title: {
                                text: '会议室使用排行'
                            },
                            subtitle: {
                                text: '数据来源: 会议室预约管理系统'
                            },
                            xAxis: {
                                categories: [<%=RoomNames %>],
                                title: {
                                    text: null
                                }
                            },
                            yAxis: {
                                min: 0,
                                title: {
                                    text: '时长',
                                    align: 'high'
                                },
                                labels: {
                                    overflow: 'justify'
                                }
                            },
                            tooltip: {
                                valueSuffix: '小时'
                            },
                            plotOptions: {
                                bar: {
                                    dataLabels: {
                                        enabled: true
                                    }
                                }
                            },
                            legend: {
                                layout: 'vertical',
                                align: 'right',
                                verticalAlign: 'top',
                                x: -40,
                                y: 100,
                                floating: true,
                                borderWidth: 1,
                                backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
                                shadow: true
                            },
                            credits: {
                                enabled: false
                            },
                            series: [{
                                name: '会议室使用时长',
                                data: [<%=RoomValues %>]
                            }]
                        });
                    });

                </script>

            </div>
            <div class="col-md-5">
                <div class="panel panel-default">
                    <div class="panel-heading">最近3天的会议</div>
                    <div class="panel-body">
                        <table class="table ">
                            <tr>
                                <th>会议时间</th>
                                <th>会议名称</th>
                                <th>会议室</th>
                            </tr>
                            <asp:Repeater ID="rptMeeting" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <a href="/admin/Meeting/MeetingDetails.aspx?id=<%#Eval("m_id") %>">
                                                <%#((DateTime)Eval("m_startDate")).ToString("yyyy-MM-dd HH:mm")%> 
                                            --
                                            <%#((DateTime)Eval("m_endDate")).ToString(" HH:mm")%>
                                            </a>
                                        </td>
                                        <td>
                                            <%#Eval("m_MeetingName")%>
                                        </td>
                                        <td>
                                            <%#Eval("r_name")%>   
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                </div>

            </div>




        </div>
    </div>

    <uc1:MyFooter runat="server" ID="MyFooter" />
</body>
</html>
