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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="department_select_mult.aspx.cs" Inherits="web_personnel_department_Department_select_mult" %>
  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.     <script language="javascript" type="text/javascript">
  7.         function setDepartment()
  8.         {
  9.             var options = document.getElementById("LbSelected").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.LblDepartments.innerText = text.substring(0, text.length-1);
  19.             window.parent.opener.document.all.DepartmentIds.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.             &nbsp;</center>
  29.         <center>
  30.             &nbsp;</center>
  31.         <center>
  32.         <table>
  33.             <tr>
  34.                 <td>
  35.                     <asp:ListBox ID="LbDepartment" runat="server" Rows="25" Width="200px" SelectionMode="Multiple"></asp:ListBox>
  36.                 </td>
  37.                 <td>
  38.                     <asp:Button ID="BtnAdd" runat="server" Text="添加>>" OnClick="BtnAdd_Click" /><br />
  39.                     <br />
  40.                     <asp:Button ID="BtnDelete" runat="server" Text="<<刪除" OnClick="BtnDelete_Click" /><br />
  41.                     <br />
  42.                     <asp:Button ID="BtnAddAll" runat="server" Text="全部添加" OnClick="BtnAddAll_Click" /><br />
  43.                     <br />
  44.                     <asp:Button ID="BtnDeleteAll" runat="server" Text="全部刪除" OnClick="BtnDeleteAll_Click" />
  45.                 </td>
  46.                 <td>
  47.                     <asp:ListBox ID="LbSelected" runat="server" Rows="25" Width="200px" SelectionMode="Multiple"></asp:ListBox>
  48.                 </td>
  49.             </tr>
  50.         </table><br />
  51.             <asp:Button ID="BtnOk" runat="server" Style="position: relative" Text="已選好, 請點這里"
  52.                 Width="130px" OnClientClick="setDepartment()" />&nbsp;&nbsp;
  53.             <asp:Button ID="BtnCancel" runat="server" Style="left: 0px; position: relative" Text="取消" OnClick="BtnCancel_Click" />
  54.         </center>
  55.     </div>
  56.     </form>
  57. </body>
  58. </html>