<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="TotCms.Web.Office.Staff.Manage" %>
<%@ 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">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="right_dqwz">员工管理</div>
    <table cellpadding="0" cellspacing="1" border="0" width="100%">
      <tr>
        <td class="topic" height="30"><img src="../images/icon/blue/16x16/plus.png" border="0" height="14" /><a href="Staff_Add.aspx">添加员工</a></td>
        <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><asp:CheckBox ID="cbSelect" runat="server" OnCheckedChanged="CbSelectChanged" AutoPostBack="true" /></td>
              <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>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
              <asp:CheckBox ID="ChkId" runat="server" Checked="false" />
              </ContentTemplate>
              <Triggers>
              <asp:AsyncPostBackTrigger ControlID="BtnSelect" EventName="Click" /> 
              </Triggers>
              </asp:UpdatePanel>
              <asp:TextBox ID="ChkTxt" runat="server" CssClass="hidden" Text='<%# Eval("id") %>'></asp:TextBox>
            </td>
            <td><%# Eval("UserName")%></td>
            <td><%# GetDeptName(Eval("DeptId"))%></td>
            <td><%# Eval("Sex")%></td>
            <td><%# Eval("Tel")%></td>
            <td><%# Eval("Mobile")%></td>
            <td><%# Eval("Positions")%></td>
            <td><%# Convert.ToInt32(Eval("IsLock"))==1?"<span class=\"red\">Yes</span>":"No"%></td>
            <td><%# Eval("WorkStatus")%></td>
            <td>
            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="editobj" CommandArgument='<%# Eval("id") %>'>编辑</asp:LinkButton>
						|
						<asp:LinkButton ID="LinkButton2" OnLoad="Delete_Load" runat="server" CommandName="deleteobj" CommandArgument='<%# Eval("id") %>'>删除</asp:LinkButton>
            </td>
            </tr>
        </ItemTemplate>     
        <EmptyDataTemplate>
            <div class="info">暂时没有数据.</div>
        </EmptyDataTemplate>       
    </asp:ListView>
    <div align="center">
    <asp:Button ID="BtnSelect" runat="server" Text="反选" onclick="BtnSelect_Click" />
    <asp:DropDownList ID="BatRunType" runat="server">
      <asp:ListItem Text="==选择操作选项==" Value="" ></asp:ListItem>            
      <asp:ListItem Text="批量删除" Value="delete"></asp:ListItem>
      <asp:ListItem Text="批量锁定" Value="lock"></asp:ListItem>
      <asp:ListItem Text="批量解锁" Value="unlock"></asp:ListItem>
    </asp:DropDownList>
    <asp:Button ID="BtnRun" runat="server" Text="执行操作" onclick="BtnRun_Click" OnClientClick="return confirm('确定执行吗?')" />
    </div>
    <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>

