<%@ Page Language="C#" AutoEventWireup="true"   %>

<!DOCTYPE html >
<html  >
<head id="Head1" runat="server">
    <title>启明星会议室预定系统终端显示</title>
 
      <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
      
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" /> 
    <link href="../style/patch.css" rel="stylesheet" />
    <script src="../javascript/jquery-1.9.1.min.js" type="text/javascript"></script> 
    <script src="../bootstrap/js/bootstrap.min.js"></script>
 
   <script src="template3/date.js"></script>
    
     
     

<script>


    function GetBook() {


        GetBookList();
        setTimeout("GetBook()", 180000);
    }


    $(document).ready(function () {
        GetBook();
    });





</script> 
     
 
  
</head>
<body   >
     


         <div class="navbar navbar-inverse navbar-fixed-top" style="background-color:#009688; border:0px;"  >
            <div class="container">
                <div class="navbar-header"> 
                    <a href="#" style="color:#ffffff; font-size:30px;" class="navbar-brand">  <%=Company.Name %> 当天会议列表 </a> 
                </div>
                 <div style="color:#ffffff;  font-size:24px; float:right; margin-top:15px; margin-bottom:10px; margin-right:30px">
                    <span id="bgclock"></span>
                 </div>
            </div>
        </div>


     
     <div class="clearfix"></div>
    <div style="margin-top:60px;"></div>
   
  <div id="booklist"></div>
 	
 
 
       

 
     
    
   
</body>




<script>





</script>
    
    
    
      
<script>
    clock();
</script>









    

<script>





    function GetBookList() {

        $.getJSON(
             "ajax/GetAllBook.aspx",
           { random: Math.random() },

    function (data) {
        console.log(data);
        var html = '<table class="table table-hover" style="font-size:20px"><tr><th width=10px>&nbsp;</th><th width=180px>会议室</th><th width=180px>会议时间</th><th width=180px>预订人</th><th>会议主题</th></tr>';


        try {

            $.each(data, function (i, entry) {
               
                html += "<tr class=item id=item" + i + "><td>&nbsp;</td><td>"+entry["roomname"]+"</td> <td>"+entry['begintime1'] +' - '+entry['endtime1']+"</td><td>"+entry["contactname"]+"</td>  <td>"+entry['intro']+"</td></tr>";         

            });

            html += "</table>";
        }
        catch (e) {

        }


        $("#booklist").html(html);

        SetPage(0);
    });

    }
    
</script>
    
    
    
       
 


 <script>


     pageSize = 12;
     function SetPage(pIndex) {
         items = $(".item");
         recordCount = items.length;
         pageCount = parseInt((recordCount / pageSize));
         pageCount = ((recordCount % pageSize) != 0 ? pageCount + 1 : pageCount);
         //pageCount 页数


         if (pIndex > pageCount - 1) {
             pIndex = 0;
         }


         //隐藏所有
         $(".item").each(function () {
             $(this).addClass("hide");
         }
         );


         //定义显示的
         for (i = pIndex * pageSize; i < (pIndex + 1) * pageSize; i++) {
             $("#item" + i).removeClass("hide");

         }

         pIndex = pIndex + 1;

         setTimeout("SetPage(" + pIndex + ")", 15000);
     }





 </script>

    
 

</html>