<%@ Page Title="" Language="C#" MasterPageFile="~/Report/Report.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="Book.Report._default1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cont_form" runat="server">


     <div class="well">
     通过此报表，会议室管理员可以快速了解各会议室使用情况。
 </div>


      <table class="table  ">
         <tr>
               
             <th>
                 统计时间从
             </th>

             <td colspan="2" width="500px" class="form-inline">
                    <input name="dt1" type="text" id="dt1" class="form-control" value="<%=dt1 %>" onclick="laydate()" class=" btn-flat enter-start" style="width:180px;" />  
							<b>到</b>
                             <input name="dt2"  value="<%=dt2 %>"  type="text" id="dt2" " class="form-control" onclick="laydate()" class="_dt btn-flat enter-end" style="width:180px;" />  

                   <input type="button" value="确定"   onclick="ReDraw();"   class="btn btn-primary btn-sm btn-flat" />
             </td>

          
         </tr>


          <tr>
              <td colspan="5">
                  &nbsp;
              </td>
          </tr>
     </table>
				  





    

  <p></p>
        <table width="100%" >

        <tr valign="top">
            <td width="300px">
 <b>1.预订次数(单位：次)</b> <br /><br />

        <div id="div_times" style="width:450px; height:300px;  ">
            <img src="images/loading.gif"  id="img_times"/> 
       </div>


   


</td>
    <td width="750px">  
   <b> 2.使用时长统计(单位：小时)</b>
       <div id="div_during" style="width:700px; height:400px;  ">
          <img src="images/loading.gif"  id="img_during"/>
      </div>
          
 </td>
            </tr>
         </table>





    





      

<br /><br /><br />
        <table width="100%" >

        <tr valign="top">
            <td width="300px">
 <b>3.部门预订次数(单位：次)</b> <br /><br />

        <div id="div_depttimes" style="width:450px; height:300px;  ">
            <img src="images/loading.gif"  id="img_depttimes"/> 
       </div>


   


</td>
    <td width="750px">  
   <b> 4.部门使用时长统计(单位：小时)</b>
       <div id="div_deptduring" style="width:700px; height:400px;  ">
          <img src="images/loading.gif"  id="img_deptduring"/>
      </div>
          
 </td>
            </tr>
         </table>








    

    <div>
        <b  >5.月度会议次数趋势统计，了解最近几个月每月的会议数量。</b>
         

        <div id="div_trending" style="width:900px; height:350px; margin-left:50px; margin-top:30px;">
            <img src="../images/loading.gif" id="img_trending" />
        </div>
    </div>





    <div>
        <b  >6.会议时段统计,了解一般会议通常是多长时长</b>
         

        <div id="div_meetingduring" style="width:900px; height:350px; margin-left:50px; margin-top:30px;">
            <img src="../images/loading.gif" id="img_meetingduring" />
        </div>
    </div>





























    <script>
 
        function ReDraw()
        { 
            var dt1 = $("#dt1").val(); //"2000-1-1";
            var dt2 = $("#dt2").val(); "2020-1-1";

    //1
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "times" ,dt1:dt1, dt2:dt2 },
            cache: true, 
            dataType: 'json',
            success: function (data) {
               
                DrawPie(data, "div_times","预订次数")
                $("#img_times").hide();
            },
            error: function () {
                $("#img_times").hide();
            },
        });

 

         //2    
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "during", dt1: dt1, dt2: dt2 },
            cache: true,
            dataType: 'json',
            success: function (data) { 
                DrawBars(data, "div_during", "", false, false, "bar")
                $("#img_during").hide(); 

            },
            error: function () {
                $("#img_during").hide();
            },
        });












            //3
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "depttimes", dt1: dt1, dt2: dt2 },
            cache: true,

            dataType: 'json',
            success: function (data) { 
                DrawPie2(data, "div_depttimes", "部门预订次数")
                $("#img_depttimes").hide(); 

            },
            error: function () {
                $("#img_depttimes").hide();
            },
        });



            //4    
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "deptduring", dt1: dt1, dt2: dt2 },
            cache: true,
            dataType: 'json',
            success: function (data) {
                DrawBars(data, "div_deptduring", "", false, false, "bar")
                $("#img_deptduring").hide();

            },
            error: function () {
                $("#img_deptduring").hide();
            },
        });







            //5   
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "trending", dt1: dt1, dt2: dt2 },
            cache: true,
            dataType: 'json',
            success: function (data) {
                DrawBars(data, "div_trending", "", false, false, "line")
                $("#img_trending").hide();

            },
            error: function () {
                $("#img_trending").hide();
            },
        });










            //6   
        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "meetingduring", dt1: dt1, dt2: dt2 },
            cache: true,
            dataType: 'json',
            success: function (data) {
                DrawBars(data, "div_meetingduring", "", false, false, "bar")
                $("#img_meetingduring").hide();

            },
            error: function () {
                $("#img_meetingduring").hide();
            },
        });



        }


       
    </script>





    
   <br /><br />













    <script>

        ReDraw();
    </script>


</asp:Content>
