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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employee_list_all.aspx.cs" Inherits="web_approvel_employee_list_all" %>
  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;
  13.         
  14.             &nbsp;<asp:GridView ID="EmployeeList" runat="server" AllowPaging="True" AllowSorting="True"
  15.                 AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
  16.                 BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical"
  17.                 OnRowCreated="EmployeeList_RowCreated" OnRowDataBound="EmployeeList_RowDataBound"
  18.                 PageSize="20" Style="position: relative; left: 0px; top: 0px;"  Width="602px" Height="561px">
  19.                 <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  20.              
  21.                 <Columns>
  22.                     <asp:TemplateField HeaderText="部門"  SortExpression="name">
  23.                         <ItemTemplate >
  24.                             <asp:Label ID="LblDepartment" runat="server" Style="position: relative"></asp:Label>
  25.                         </ItemTemplate>
  26.                         <ItemStyle HorizontalAlign="Center" WIDTH="100px"/>
  27.                         <HeaderStyle BorderStyle="Dotted" />
  28.                         <ControlStyle Width="100px" />
  29.                     </asp:TemplateField>
  30.                     <asp:BoundField DataField="emp_no" HeaderText="工號" SortExpression="emp_no" >
  31.                         <ItemStyle HorizontalAlign="Left" WIDTH="50px"/>
  32.                         <ControlStyle BorderStyle="Dotted"  />
  33.                         <HeaderStyle BorderStyle="Dotted" />                        
  34.                     </asp:BoundField>
  35.                     <asp:BoundField DataField="emp_name" HeaderText="姓名" SortExpression="emp_name" >
  36.                         <ControlStyle BorderStyle="Dotted" />
  37.                         <HeaderStyle BorderStyle="Dotted" /> 
  38.                         <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>                      
  39.                     </asp:BoundField>
  40.                     <asp:BoundField DataField="position" HeaderText="職位" SortExpression="position1" >
  41.                         <ControlStyle BorderStyle="Dotted" />
  42.                         <HeaderStyle BorderStyle="Dotted" /> 
  43.                         <ItemStyle HorizontalAlign="Center" WIDTH="80px"/>                         
  44.                     </asp:BoundField>
  45.                     <asp:BoundField DataField="tel_extension" HeaderText="分機" SortExpression="tel_extension" >
  46.                         <ControlStyle BorderStyle="Dotted"/>
  47.                         <HeaderStyle BorderStyle="Dotted" /> 
  48.                         <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>                         
  49.                     </asp:BoundField>
  50.                     
  51.                     <asp:TemplateField HeaderText="狀態">
  52.                         <ItemTemplate>
  53.                             <asp:LinkButton ID="LbWhere" runat="server" ></asp:LinkButton>
  54.                         </ItemTemplate>
  55.                         <HeaderStyle BorderStyle="Dotted" />  
  56.                         <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>                       
  57.                     </asp:TemplateField>
  58.                     
  59.                 </Columns>
  60.                 <PagerStyle BackColor="#999999" Font-Overline="False" Font-Strikeout="False" ForeColor="Black"
  61.                     HorizontalAlign="Center" Wrap="True" />
  62.                 <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  63.                 <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  64.                 <AlternatingRowStyle BackColor="Gainsboro" />
  65.                 <PagerSettings FirstPageText="第一頁" LastPageText="最后一頁" Mode="NextPrevious" NextPageText="下一頁"
  66.                     PreviousPageText="上一頁" />
  67.             </asp:GridView>
  68.         <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 p ON e.position = p.id  left join oa_department as d on e.department_id=d.id WHERE e.dimission_date='' ORDER BY p.sequence asc" ConnectionString="<%$ ConnectionStrings:oaConnection %>">
  69.         </asp:SqlDataSource>
  70.   </center>
  71.     </div>
  72.     </form>
  73. </body>
  74. </html>