authority_employee_list.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:3k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="authority_employee_list.aspx.cs" Inherits="web_system_authority_employee_list" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6.     <link href="../../css/style.css" rel="stylesheet" type="text/css" />
  7. </head>
  8. <body>
  9.     <form id="form1" runat="server">
  10.     <div>
  11.     <center>
  12.         &nbsp;</center>
  13.         <center>
  14.         <asp:GridView ID="EmployeeList" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id" DataSourceID="SqlDataSource1" GridLines="Vertical" OnRowCreated="EmployeeList_RowCreated" PageSize="20" Width="600px" OnRowDataBound="EmployeeList_RowDataBound">
  15.             <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  16.             <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  17.             <Columns>
  18.                 <asp:BoundField DataField="emp_no" HeaderText="員工工號" SortExpression="emp_no" />
  19.                 <asp:BoundField DataField="emp_name" HeaderText="員工姓名" SortExpression="emp_name" />
  20.                 <asp:BoundField DataField="position" HeaderText="職位" SortExpression="position" />
  21.                 <asp:TemplateField HeaderText="所屬部門">
  22.                     <ItemTemplate>
  23.                         <asp:Label ID="LblDepartment" runat="server" Style="position: relative"></asp:Label>
  24.                     </ItemTemplate>
  25.                 </asp:TemplateField>
  26.             </Columns>
  27.             <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  28.             <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  29.             <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  30.             <AlternatingRowStyle BackColor="#DCDCDC" />
  31.         </asp:GridView>
  32.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  33.                 SelectCommand="SELECT e.id, e.emp_no, e.emp_name, p.name AS position FROM dbo.OA_EMPLOYEE AS e INNER JOIN dbo.OA_EMPLOYEE_POSITION AS p ON e.position = p.id WHERE (e.user_group = @group_id)">
  34.                 <SelectParameters>
  35.                     <asp:QueryStringParameter DefaultValue="0" Name="group_id" QueryStringField="g_id" />
  36.                 </SelectParameters>
  37.             </asp:SqlDataSource>
  38.             <br />
  39.         <input type="button" onclick="javascript:history.go(-1);" value="返回" />
  40.         </center>
  41.     </div>
  42.     </form>
  43. </body>
  44. </html>