<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="helpdesk.wap._default" %>

<!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 id="Head1" runat="server">
    <title>启明星Helpdesk问题看板</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="date.js"></script>
    
     
     

    
 <!-- 294159 -->
 <style>


     table.table th {
         font-size:25px;
     }
       table.table td {
         font-size:20px;
     }
     
  
</style>



<script>


    function GetData() {  
        GetTicketList();
        setTimeout("GetTicketList()", 120000);
    }


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





</script> 
     
 
  
</head>
<body style=" margin:0 auto; width:1366px; font-family:Arial;   overflow-x:hidden;overflow-y:hidden;" >
  

         <div class="navbar navbar-inverse navbar-fixed-top" style="background-color:#ff0000; color:#ffffff; border:0px;"  >
            <div class="container">
                <div class="navbar-header"> 
                    <a href="#" style="color:#ffffff; font-size:30px;" class="navbar-brand">  <span id="currentroomname" >  
       </span> 启明星Helpdesk问题看板 </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>

    <script>
        clock();
    </script>
     
     <div class="clearfix"></div>
    <div style="margin-top:100px;"></div>

      
 
     <div id="ticket_list">
     
     </div>
    
     
     
     

     



<script>





    function GetTicketList() {

        $.getJSON(
             "data.aspx",
           { random: Math.random() },


    function (data) {

        var html = '<table class=table>';
        html += "<tr>";
        html += "<th width=50%>问题主题</th>";
        html += "<th  width=10%>类别</th>";
        html += "<th width=10%>提交部门</th>";
        html += "<th width=10%>提交时间</th>";
        html += "<th width=10%>状态</th>";
        html += "</tr>";


        try {

            $.each(data, function (i, entry) {
                html += "<tr class=item id=item" + i + ">";
                html += "<td >" + entry['title'] + "</td>";
                html += "<td  >" + entry['category2name'] + "</td>";
                html += "<td  >" + entry["contactdept"] + "</td>";
                html += "<td  >" + entry['createdate'] + "</td>";
                html += "<td  >" + entry['status'] + "</td>";
                html += "</tr>";
            });

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

        }


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

        SetPage(0);
    });

    }
    
    </script>
    
    
    
       
 


 <script>


     pageSize =8;
     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>



 </body>


</html>