employee_list_search.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:5k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employee_list_search.aspx.cs" Inherits="web_approvel_employee_list_search" %>
- <!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="../../css/style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server" defaultbutton="BtnOk">
- <div>
- <center>
- <asp:RadioButtonList ID="RbType" runat="server" RepeatDirection="Horizontal" style="left: -120px; position: relative; top: 17px">
- <asp:ListItem Text="工號" Value="emp_no" Selected="True"></asp:ListItem>
- <asp:ListItem Text="姓名" Value="emp_name"></asp:ListItem>
- </asp:RadioButtonList>
- <asp:TextBox ID="TxtValue" runat="server" style="left: 118px; position: relative; top: -11px"></asp:TextBox>
- <asp:Button ID="BtnOk" runat="server" Text="查詢" OnClick="BtnOk_Click" style="left: 119px; position: relative; top: -9px" />
- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="TxtValue" runat="server"
- ErrorMessage="請輸入查詢內容" style="left: 127px; position: relative; top: -12px"></asp:RequiredFieldValidator><br />
- <br />
- <asp:GridView style="POSITION: relative" id="EmployeeList" runat="server" OnRowDataBound="EmployeeList_RowDataBound"
- OnRowCreated="EmployeeList_RowCreated" Width="600px" GridLines="Vertical" DataSourceID="SqlDataSource1" CellPadding="3" BorderWidth="1px" BorderStyle="None" BorderColor="#999999" BackColor="White" AutoGenerateColumns="False" PageSize="20" AllowPaging="True" AllowSorting="True">
- <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
- <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
- <Columns>
- <asp:TemplateField HeaderText="部門">
- <ItemTemplate>
- <asp:Label ID="LblDepartment" runat="server" Style="position: relative"></asp:Label>
- </ItemTemplate>
- <ItemStyle HorizontalAlign="Center" WIDTH="100px"/>
- </asp:TemplateField>
- <asp:BoundField DataField="emp_no" HeaderText="工號" SortExpression="emp_no" >
- <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
- </asp:BoundField>
- <asp:BoundField DataField="emp_name" HeaderText="姓名" SortExpression="emp_name" >
- <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
- </asp:BoundField>
- <asp:BoundField DataField="position" HeaderText="職位" SortExpression="position" >
- <ItemStyle HorizontalAlign="Center" WIDTH="80px"/>
- </asp:BoundField>
- <asp:BoundField DataField="tel_extension" HeaderText="分機" SortExpression="tel_extension" >
- <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
- </asp:BoundField>
- <asp:TemplateField HeaderText="狀態">
- <ItemTemplate>
- <asp:LinkButton ID="LbWhere" runat="server" Style="position: relative"></asp:LinkButton>
- </ItemTemplate>
- <ItemStyle HorizontalAlign="Center" WIDTH="50px"/>
- </asp:TemplateField>
- </Columns>
- <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" Font-Overline="False" Font-Strikeout="False" Wrap="True" />
- <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
- <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
- <AlternatingRowStyle BackColor="Gainsboro" />
- <PagerSettings FirstPageText="第一頁" LastPageText="最后一頁" Mode="NextPrevious" NextPageText="下一頁"
- PreviousPageText="上一頁" />
- </asp:GridView>
- <asp:SqlDataSource id="SqlDataSource1" runat="server" SelectCommand="SELECT d.name,e.id, e.emp_no, e.emp_name, p.name AS position,p.sequence , 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 %>">
- </asp:SqlDataSource>
- </center>
- </div>
- </form>
- </body>
- </html>