<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DepartmentList.aspx.cs" Inherits="Admin_System_DepartmentList" %>

<!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 runat="server">
    <title>部门管理</title>
    <link href="../../StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="listAddLink">
            <a href="AddDepartment.aspx">添加部门</a></div>
        <div class="listTop">
            <span class="title">部门管理</span>
        </div>


    <asp:Repeater ID="rpDepartmentList" runat="server" DataSourceID="objdsDepartmentList">
        <HeaderTemplate>
         <table border="0" cellpadding="1" cellspacing="0" class="tableList" width="800">
            <tr class="header">
                <td style="width: 30px">
                    编号</td>
                <td>
                    部门名称</td>
                <td>
                    部门人数</td>
                <td>
                    操 作</td>
            </tr>
        </HeaderTemplate>
        
        <ItemTemplate>
              <tr class="body" >
                <td>
                    <%#Eval("DeptID") %></td>
                <td style="height: 18px">
                    <%#Eval("DeptName") %></td>
                <td style="height: 18px">
                    <%#Eval("UserCount") %>人</td>
                <td style="height: 18px">
                    &nbsp;
                    <a href='modDepartment.aspx?deptID=<%#Eval("DeptID") %>'>修改</a> | <a href='DelDepartment.aspx?deptID=<%#Eval("DeptID") %>' onclick="return confirm('请谨慎考虑！该操作同时将删除部门所属的人员');">删除</a></td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
        </asp:Repeater>
        <div class="listBottom">
            <span class="content">总共<asp:Label ID="lblSum" runat="server" Text="0"></asp:Label>条记录
            </span></div>
        <asp:ObjectDataSource ID="objdsDepartmentList" runat="server" SelectMethod="GetDeptList"
            TypeName="BLL.BLLDepartment" OnSelected="objdsDepartmentList_Selected" OnSelecting="objdsDepartmentList_Selecting"></asp:ObjectDataSource>
  
    </form>
</body>
</html>
