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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employee_list_work.aspx.cs" Inherits="web_approvel_employee_list_work" %>
  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 style="POSITION: relative" id="EmployeeList" runat="server" OnRowDataBound="EmployeeList_RowDataBound" OnRowCreated="EmployeeList_RowCreated" Width="595px" GridLines="Vertical" DataSourceID="SqlDataSource1" CellPadding="3" BorderWidth="1px" BorderStyle="None" BorderColor="#999999" BackColor="White" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True" PageSize="20">
  15.             <FooterStyle BackColor="#CCCCCC" ForeColor="Black"  />
  16.             <RowStyle BackColor="#EEEEEE" ForeColor="Black"  />
  17.             <Columns>
  18.                 <asp:TemplateField HeaderText="部門">
  19.                     <ItemTemplate  >
  20.                         <asp:Label ID="LblDepartment" runat="server" Style="position: relative"></asp:Label>
  21.                         
  22.                     </ItemTemplate>
  23.                     <ItemStyle HorizontalAlign="Center" WIDTH="100px"/>
  24.                 </asp:TemplateField>
  25.                 <asp:BoundField DataField="emp_no" HeaderText="工號" SortExpression="emp_no" >
  26.                   <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
  27.                 </asp:BoundField>
  28.                 <asp:BoundField DataField="emp_name" HeaderText="姓名" SortExpression="emp_name" >
  29.                   <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
  30.                 </asp:BoundField>
  31.                 <asp:BoundField DataField="position" HeaderText="職位" SortExpression="position" >
  32.                   <ItemStyle HorizontalAlign="Center" WIDTH="80px"/>
  33.                 </asp:BoundField>
  34.                 <asp:BoundField DataField="tel_extension" HeaderText="分機" SortExpression="tel_extension" >
  35.                   <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
  36.                 </asp:BoundField>
  37.                 <asp:TemplateField HeaderText="狀態" >
  38.                     <ItemTemplate>
  39.                         <asp:LinkButton ID="LbWhere" runat="server" Style="position: relative"></asp:LinkButton>
  40.                     </ItemTemplate>
  41.                      <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>   
  42.                 </asp:TemplateField>
  43.             </Columns>
  44.             <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" Font-Overline="False" Font-Strikeout="False" Wrap="True"  />
  45.             <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White"  />
  46.             <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White"  />
  47.             <AlternatingRowStyle BackColor="Gainsboro"  />
  48.             <PagerSettings FirstPageText="第一頁" LastPageText="最后一頁" Mode="NextPrevious" NextPageText="下一頁"
  49.                 PreviousPageText="上一頁" />
  50.         </asp:GridView>
  51.         <asp:SqlDataSource id="SqlDataSource1" runat="server" SelectCommand="SELECT d.name,e.id, e.emp_no, e.emp_name, p.name AS position,p.sequence ,&#13;&#10; e.tel, e.smart_phone, e.tel_extension FROM dbo.OA_EMPLOYEE AS e INNER JOIN dbo.OA_EMPLOYEE_POSITION AS &#13;&#10;p ON e.position = p.id  left join oa_department as d on e.department_id=d.id WHERE e.dimission_date=''&#13;&#10; ORDER BY p.sequence asc" ConnectionString="<%$ ConnectionStrings:oaConnection %>">
  52.         </asp:SqlDataSource>
  53.         </center>
  54.     </div>
  55.     </form>
  56. </body>
  57. </html>