123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="usersList.aspx.cs" Inherits="OA2014.users.usersList" %>
- <%@ Register Src="../publicControls/pageControl.ascx" TagName="pageControl" TagPrefix="uc1" %>
- <!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/all.css" rel="stylesheet" type="text/css" />
- <link href="../css/pagination.css" rel="stylesheet" type="text/css" />
-
- <!-- toastr提示框style -->
- <link href="../css/toastr.css" rel="stylesheet" />
- <!-- autocomplete 内容自动识别style -->
- <link href="../js/Customer/jQueryAutocompletePlugin-master/jquery.autocomplete.css" rel="stylesheet" />
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <div class="ps">
- <table class="ps" cellpadding="0" cellspacing="0">
- <tr>
- <td class="ps_font" style="width:480px;">
- <asp:DropDownList ID="ddlDepartment" AutoPostBack="true" runat="server" Width="100"
- OnTextChanged="ddlDepartment_TextChanged" />
- 员工姓名:
- <asp:TextBox ID="txtName" runat="server" Width="120" Style="border: 1px solid #b3b3b3;" change="change()" />
- <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="btn" ForeColor="White" Style="width: 45px;"
- OnClick="btnSelect_Click" />
- </td>
- <td class="ps_select">
-
- </td>
- <td class="ps_add">
- <asp:Button ID="btnAdd" runat="server" Text="新增数据" CssClass="btn" Style=" width: 65px; "
- OnClick="btnAdd_Click" />
- <asp:Button ID="btnUpdate" runat="server" Text="刷新数据" CssClass="btn" Style="width: 65px;"
- OnClientClick="location.reload();" />
- </td>
- </tr>
- </table>
- </div>
- <div class="list">
- <table class="list" cellpadding="0" cellspacing="0" border="0">
- <tr class="tr_title">
- <td class="td">序 号
- </td>
- <td class="td">员工号
- </td>
- <td class="td">姓 名
- </td>
- <td class="td">分属公司
- </td>
- <td class="td">职 位
- </td>
- <td class="td">分机号
- </td>
- <td class="td">手机号
- </td>
- <td class="td">紧急联络电话
- </td>
- <td class="td">电子邮箱
- </td>
- <td class="td_oper">操 作
- </td>
- </tr>
- <asp:Repeater ID="rpData" runat="server" OnItemDataBound="rpData_ItemDataBound">
- <ItemTemplate>
- <tr class="tr_content">
- <td class="td">
- <%# Container.ItemIndex + 1%>
- </td>
- <td class="td">
- <%#Eval("Number")%>
- </td>
- <td class="td">
- <%#Eval("CnName")%>
- </td>
- <td class="td">
- <asp:HiddenField ID="HCompany" Value=<%#Eval("Company") %> runat="server" />
- <asp:Label ID="lblCompany" runat="server" />
- </td>
- <td class="td">
- <%#Eval("Post")%>
- </td>
- <td class="td">
- <%#Eval("Ext")%>
- </td>
- <td class="td">
- <%#Eval("Phone")%>
- </td>
- <td class="td">
- <%#Eval("UrgentPhone")%>
- </td>
- <td class="td">
- <%#Eval("Email")%>
- </td>
- <td class="td_oper">
- <asp:LinkButton ID="lbtnEdit" runat="server" Text="编 辑" OnClick="lbtnEdit_Click" CommandArgument='<%#Eval("Id")%>' />
- |
- <asp:LinkButton ID="lbtnDel" runat="server" Text="删 除" OnClick="lbtnDel_Click" OnClientClick='return confirm("温馨提示:确定删除该条数据吗?");' CommandArgument='<%#Eval("Id")%>' />
- </td>
- </tr>
- </ItemTemplate>
- </asp:Repeater>
- </table>
- </div>
- <uc1:pageControl ID="pageControl" runat="server" />
- </div>
- <!-- Jquery -->
- <script type="text/javascript" src="../js/Customer/jquery-1.9.1.min.js"></script>
- <!-- autocomplete 内容自动识别 -->
- <script type="text/javascript" src="../js/Customer/jQueryAutocompletePlugin-master/jquery.autocomplete.min.js"></script>
- <script type="text/javascript">
- $().ready(function () {
- var dates = [];
- $.ajax({
- type: "POST",
- url: "/users/usersList.aspx/GetUsers",
- data: {},
- dataType: "json",
- contentType: "application/json",
- success: function (data) {
- var ec = JSON.parse(data.d);
- if (ec.errorCode != "0") {
- var date1 = JSON.parse(ec.msg);
- for (var i = 0; i < date1.length; i++) {
- dates.push(date1[i]);
- }
- } else {
- taostr.error(err);
- }
- },
- Error: function (ex) {
- taostr.error(ex);
- }
- });
- $("#txtName").autocomplete(dates, {
- minChars: 1, // 自动完成激活之前填入的最少字符
- max: 15, //列表里的条目数
- scrollHeight: 220, //提示的高度,溢出显示滚动条
- scrollWidth: 500, //提示的宽度,溢出隐藏
- //mustMatch: true, //自动填充
- matchContains: true, //包含匹配,是否只显示匹配项
- autoFill: false, //自动填充
- //scroll: true, //是否显示滚动条
- // 此处实际请求的URL为"AutoComplete.ashx?q='[你在txtAutoComplete中输入的值]'&action='autoComplete'&value='guo'"
- //extraParams: { action: "/finance/proceedsreceived.aspx/getteamname", value: $("#txtTzNames").val() },
- //格式化列表中的条目 row:条目对象,i:当前条目index,max:总条目数
- formatItem: function (data, i, total) {
- return data[0];
- },
- //配合formatItem使用,作用在于,由于使用了formatItem,所以显示的条目内容有所改变,
- //而我们要匹配的是原始的数据,所以用formatMatch做一个调整,使之匹配原始数据
- formatMatch: function (data, i, total) {
- return data[0];
- },
- //设置用户选择某一条目后文本框显示的内容
- formatResult: function (data) {
- return data[0];
- }
- });
- });
- </script>
- <!-- Toastr -->
- <script type="text/javascript" src="../js/toastr.js"></script>
-
- <!-- toastr消息参数处理 -->
- <script type="text/javascript" src="../js/PottingToastr.js"></script>
- </form>
- </body>
- </html>
|