<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="TotCms.Web.Office.Staff.List" %>
<%@ Register assembly="TotCms.Controls" namespace="TotCms.Controls" tagprefix="cc1" %>
<!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></title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      $(function () {
        $("#rplist tr").hover(
         function () {
           $(this).removeClass("lines");
           $(this).addClass("lines2");    //鼠标经过添加hover样式 
         },
         function () {
           $(this).removeClass("lines2");
           $(this).addClass("lines");    //鼠标经过添加hover样式 
         }
        );
      });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="right_dqwz">员工通讯录</div>
    <table cellpadding="0" cellspacing="1" border="0" width="100%">
        <td class="topic" align="right">姓名：<asp:TextBox ID="tbUserName" runat="server"></asp:TextBox>
          <asp:Button ID="Button1" runat="server" Text="查询" onclick="Button1_Click" />
        </td>
      </tr>   
    </table>
    <asp:ListView ID="lvList" runat="server" ItemPlaceholderID="items" 
        onitemcommand="lvList_ItemCommand" 
      onitemdatabound="lvList_ItemDataBound" DataKeyNames="id">
        <LayoutTemplate>
          <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" id="rplist">            
          <tr class="suphead">
              <td>照片</td>
              <td>姓名</td>
              <td>部门</td>
              <td>性别</td>
              <td>电话</td>
              <td>手机</td>
              <td>邮箱</td>       
              <td>职称</td>          
              <td>职位</td>
                     
          </tr>
          <asp:PlaceHolder runat="server" ID="items"></asp:PlaceHolder>
          </table>
        </LayoutTemplate>   
        <ItemTemplate>
            <tr class="lines" onmouseover="this.style.backgroundColor='#ffffff';" onmouseout="this.style.backgroundColor='#f5f5f5';">
            <td height="60">            
              <a href='Staff_Show.aspx?id=<%# Eval("id") %>'><img src='<%# Eval("Photo")%>' width="60" height="50" border="0" /></a>
            </td>
            <td><a href='Staff_Show.aspx?id=<%# Eval("id") %>'><%# Eval("UserName")%></a></td>
            <td><%# GetDeptName(Eval("DeptId"))%></td>
            <td><%# Eval("Sex")%></td>
            <td><%# Eval("Tel")%></td>
            <td><%# Eval("Mobile")%></td>
            <td><%# Eval("Email")%></td>    
            <td><%# Eval("Qualification")%></td>
            <td><%# Eval("Positions")%></td>
                    
            </tr>
        </ItemTemplate>     
        <EmptyDataTemplate>
            <div class="info">暂时没有数据.</div>
        </EmptyDataTemplate>       
    </asp:ListView>
    
    <cc1:Pager ID="Pager1" runat="server" GenerateFirstLastSection="True" 
      GenerateGoToSection="True" GenerateHiddenHyperlinks="False" 
      QueryStringParameterName="CurrentPage" OnCommand="pager_Command" 
      GoToStyle="text" OfClause="/" PageClause="页" PageSize="15" />
    </form>
</body>
</html>

