EditGroupChild.aspx
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:5k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditGroupChild.aspx.cs" Inherits="OThinker.H3.Portal.EditGroupChild" %>
- <%@ Register assembly="OThinker.H3.WorkSheet" namespace="OThinker.H3.WorkSheet" tagprefix="sheetcontrols" %>
- <!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>Untitled Page</title>
- <style type="text/css">
- td {
- font-family: "verdana","arial","宋体";
- font-size: 9pt;
- line-height: 15pt;
- }
- </style>
- <script type="text/javascript">
- function selectedUser(nameId, valueId, listId, idTextId)
- {
- var text = document.getElementById(nameId).value;
- var value = document.getElementById(valueId).value;
- if(text == null || text == "")
- {
- window.alert("没有选中的子成员");
- return;
- }
- else
- {
- addUser(text, value, listId, idTextId);
- document.getElementById(nameId).value = "";
- document.getElementById(valueId).value = "";
- }
- }
- // 向List中添加选定的用户
- function addUser(Text, Value, listId, idTextId)
- {
- var objlist=document.getElementById(listId);
- for(i=objlist.length-1;i>=0;i--)
- {
- if(objlist.options[i].value == Value)
- {
- return;
- }
- }
- node = document.createElement("<option value='" + Value + "'>");
- text = document.createTextNode(Text);
- node.appendChild(text);
- objlist.appendChild(node);
- document.getElementById(idTextId).value += Value + ";";
- }
- function removeUser(listId, selectedIdId)
- {
- var objlist=document.getElementById(listId);
- var removedId;
- for(i=objlist.length-1;i>=0;i--)
- {
- if(objlist.options[i].selected == true)
- {
- removedId = objlist.options[i].value;
- objlist.remove(i);
- }
- }
- if(removedId != null && removedId != "")
- {
- // 从ID文本中删除
- var selectedUsers = document.getElementById(selectedIdId).value;
- var start = selectedUsers.indexOf(removedId);
- var preStr = selectedUsers.substring(0, start);
- var postStart = start + removedId.length + 1;
- var postEnd = selectedUsers.length;
- var postStr = selectedUsers.substring(postStart, postEnd);
- document.getElementById(selectedIdId).value = preStr + postStr;
- }
- }
- </script>
- </head>
- <body leftmargin="0" topmargin="0">
- <form id="form1" runat="server">
- <div>
- <table cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td bgcolor="#7f97da" height="25">
- <table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
- <tr>
- <td width="3%">
- <asp:ImageButton ID="btnOk" runat="server" ImageUrl="images/IB_Ok.gif" /></td>
- <td width="97%">
- <asp:LinkButton ID="lnkOk" runat="server" OnClick="lnkOk_Click"><font color="#FFFFFF">确定</font></asp:LinkButton>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width=100%>
- <tr>
- <td>
- <sheetcontrols:userselector id="txtChild" runat="server" selectunittype="User"
- selectuserurl="SelectUser.aspx"
- SelectUserImageUrl="images/IB_SelectUser.GIF"
- RemoveUserImageUrl="images/IB_Remove.ico" UserSelectable="True"
- Width="178px" GroupSelectable="True"></sheetcontrols:userselector></td>
- </tr>
- <tr>
- <td>
- <asp:PlaceHolder ID="PlaceHolderEdit" runat="server"></asp:PlaceHolder>
- </td>
- </tr>
- <tr>
- <td>
- <asp:ListBox ID="lstChild" runat="server" Height="216px" Width="300px">
- </asp:ListBox>
- </td>
- </tr>
- <tr>
- <td>
- <asp:TextBox ID="txtSelectedIds" runat="server" Width=100%></asp:TextBox>
- </td>
- </tr>
- </table>
- </div>
- </form>
- </body>
- </html>