department_select_mult.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:3k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="department_select_mult.aspx.cs" Inherits="web_personnel_department_Department_select_mult" %>
- <!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>
- <script language="javascript" type="text/javascript">
- function setDepartment()
- {
- var options = document.getElementById("LbSelected").options;
- var value = "";
- var text = "";
- for(var i=0; i<options.length; i++)
- {
- value = value + options[i].value + ";";
- text = text + options[i].text + ";";
- }
- window.parent.opener.document.all.LblDepartments.innerText = text.substring(0, text.length-1);
- window.parent.opener.document.all.DepartmentIds.value = value.substring(0, value.length-1);
- window.parent.close();
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <center>
- </center>
- <center>
- </center>
- <center>
- <table>
- <tr>
- <td>
- <asp:ListBox ID="LbDepartment" runat="server" Rows="25" Width="200px" SelectionMode="Multiple"></asp:ListBox>
- </td>
- <td>
- <asp:Button ID="BtnAdd" runat="server" Text="添加>>" OnClick="BtnAdd_Click" /><br />
- <br />
- <asp:Button ID="BtnDelete" runat="server" Text="<<刪除" OnClick="BtnDelete_Click" /><br />
- <br />
- <asp:Button ID="BtnAddAll" runat="server" Text="全部添加" OnClick="BtnAddAll_Click" /><br />
- <br />
- <asp:Button ID="BtnDeleteAll" runat="server" Text="全部刪除" OnClick="BtnDeleteAll_Click" />
- </td>
- <td>
- <asp:ListBox ID="LbSelected" runat="server" Rows="25" Width="200px" SelectionMode="Multiple"></asp:ListBox>
- </td>
- </tr>
- </table><br />
- <asp:Button ID="BtnOk" runat="server" Style="position: relative" Text="已選好, 請點這里"
- Width="130px" OnClientClick="setDepartment()" />
- <asp:Button ID="BtnCancel" runat="server" Style="left: 0px; position: relative" Text="取消" OnClick="BtnCancel_Click" />
- </center>
- </div>
- </form>
- </body>
- </html>