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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employee_list.aspx.cs" Inherits="web_personnel_curricula_vitae_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.         &nbsp;<center>
  12.         <asp:Label ID="LblTitle" runat="server" Style="position: relative; top: 0px;" Font-Bold="True" Font-Size="Medium"></asp:Label>&nbsp;</center>
  13.         <center>
  14.             <br />
  15.         <asp:GridView ID="EmployeeList" runat="server" AllowPaging="True" AllowSorting="True"
  16.             AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
  17.             BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical"
  18.             Style="position: relative" Width="500px" OnRowCreated="EmployeeList_RowCreated" OnRowDataBound="EmployeeList_RowDataBound">
  19.             <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  20.             <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  21.             <Columns>
  22.                 <asp:BoundField DataField="emp_no" HeaderText="員工工號" SortExpression="emp_no" />
  23.                 <asp:BoundField DataField="emp_name" HeaderText="員工姓名" SortExpression="emp_name" />
  24.                 <asp:BoundField DataField="position" HeaderText="職位" SortExpression="position" />
  25.                 <asp:BoundField DataField="active_date" HeaderText="入職日期" SortExpression="active_date" />
  26.                 <asp:BoundField DataField="dimission_date" HeaderText="離職日期" Visible="False" />
  27.                 <asp:TemplateField HeaderText="人在哪里">
  28.                     <ItemTemplate>
  29.                         <asp:LinkButton ID="LbWhere" runat="server" Style="position: relative"></asp:LinkButton>
  30.                     </ItemTemplate>
  31.                 </asp:TemplateField>
  32.             </Columns>
  33.             <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" Font-Overline="False" Font-Strikeout="False" Wrap="True" />
  34.             <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  35.             <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  36.             <AlternatingRowStyle BackColor="Gainsboro" />
  37.             <PagerSettings FirstPageText="第一頁" LastPageText="最后一頁" Mode="NextPrevious" NextPageText="下一頁"
  38.                 PreviousPageText="上一頁" />
  39.         </asp:GridView>
  40.         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  41.             SelectCommand="SELECT e.id, e.emp_no, e.emp_name, e.active_date, e.dimission_date, 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.department_id = @department_id) and e.dimission_date='' ORDER BY e.emp_no">
  42.             <SelectParameters>
  43.                 <asp:SessionParameter DefaultValue="0" Name="department_id" SessionField="p_department_id" />
  44.             </SelectParameters>
  45.         </asp:SqlDataSource>
  46.         </center>
  47.         <center>
  48.             &nbsp;</center>
  49.     </div>
  50.     </form>
  51. </body>
  52. </html>