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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employee_select.aspx.cs" Inherits="web_personnel_department_department_select" %>
  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 id="Head1" runat="server">
  5.     <title>選擇員工</title>
  6.     <script language="javascript" type="text/javascript">
  7.         function setEmployee()
  8.         {
  9.             var options = document.getElementById("ListSelected").options;
  10.             var value = "";
  11.             var text = "";
  12.             
  13.             for(var i=0; i<options.length; i++) 
  14.             {
  15.                 value = value + options[i].value + ";";
  16.                 text = text + options[i].text + ";";
  17.             }
  18.             window.parent.opener.document.all.TxtEmployees.innerText = text.substring(0, text.length-1);
  19.             window.parent.opener.document.all.Employee_ids.value = value.substring(0, value.length-1);
  20.             window.parent.close();
  21.         }    
  22.     </script>
  23. </head>
  24. <body>
  25.     <form id="form1" runat="server">
  26.     <div>
  27.     <center>
  28.         <table style="width: 550px; position: relative">
  29.             <tr>
  30.                 <td rowspan="3">
  31.         <asp:ListBox ID="ListEmployee" runat="server" Height="500px" Width="230px" style="position: relative" SelectionMode="Multiple"></asp:ListBox>
  32.                 </td>
  33.                 <td style="width: 86px">
  34.                 </td>
  35.                 <td rowspan="3">
  36.         <asp:ListBox ID="ListSelected" runat="server" Height="500px" Width="230px" style="position: relative" SelectionMode="Multiple"></asp:ListBox></td>
  37.             </tr>
  38.             <tr>
  39.                 <td style="width: 86px" align="center">
  40.                     <asp:Button ID="BtnAdd" runat="server" Style="left: 0px; position: relative" Text="添加-->" Width="75px" OnClick="BtnAdd_Click" /><br />
  41.                     <br />
  42.                     <asp:Button ID="BtnDelete" runat="server" Style="left: 0px; position: relative" Text="刪除<--" Width="75px" OnClick="BtnDelete_Click" /><br />
  43.                     <br />
  44.                     <asp:Button ID="BtnAddAll" runat="server" Style="left: 0px; position: relative;" Text="全部添加" Width="75px" OnClick="BtnAddAll_Click" /><br />
  45.                     <br />
  46.                     <asp:Button ID="BtnDeleteAll" runat="server" Style="position: relative" Text="全部刪除" Width="75px" OnClick="BtnDeleteAll_Click" /></td>
  47.             </tr>
  48.             <tr>
  49.                 <td style="height: 21px; width: 86px;">
  50.                 </td>
  51.             </tr>
  52.         </table>
  53.         &nbsp;
  54.     </center>
  55.         <center>
  56.             <asp:Button ID="BtnOk" runat="server" Style="position: relative" Text="已選好, 請點這里"
  57.                 Width="130px" OnClientClick="setEmployee()" />&nbsp;&nbsp;
  58.             <asp:Button ID="BtnCancel" runat="server" Style="left: 0px; position: relative" Text="取消" OnClick="BtnCancel_Click" /></center>
  59.     </div>
  60.     </form>
  61. </body>
  62. </html>