SelectCheck.aspx
资源名称:OA_at.rar [点击查看]
上传用户:tree100901
上传日期:2007-06-03
资源大小:2295k
文件大小:7k
源码类别:
OA系统
开发平台:
C#
- <%@ Page language="c#" Codebehind="SelectCheck.aspx.cs" AutoEventWireup="false" Inherits="OA.AddCheck" %>
- <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
- <HTML>
- <HEAD>
- <title>安泰办公系统</title>
- <META http-equiv="Content-Type" content="text/html; charset=gb2312">
- <LINK href="baseStyle.css" type="text/css" rel="stylesheet">
- <LINK href="menuStyle.css" type="text/css" rel="stylesheet">
- <style type="text/css">TABLE { FONT-SIZE: 9pt }
- BODY { FONT-SIZE: 9pt }
- </style>
- <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
- <meta content="C#" name="CODE_LANGUAGE">
- <meta content="JavaScript" name="vs_defaultClientScript">
- <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
- <script language="javascript">
- function AddToTargetList()
- {
- TargetList = window.document.forms[0].Target;
- var Node = TreeView1.getTreeNode(TreeView1.selectedNodeIndex);
- if(parseInt(Node.getChildren().length)==0)
- {
- var found = false;
- if(TargetList.length!=0)
- {
- for(var l=0; l<TargetList.length;l++)
- {
- if (Node.getAttribute("Text").replace(" ","") == TargetList.options[l].text)
- {
- found = true;
- break;
- }
- }
- }
- if (found != true){
- TargetList.options.add(new Option(Node.getAttribute("Text").replace(" ",""),Node.getAttribute("ID")));
- CheckSign();
- }
- }
- else
- {
- GetChildrenNodes(Node,Node.getAttribute("ID"));
- }
- }
- function GetChildrenNodes(node,nodeID)
- {
- TargetList = window.document.forms[0].Target;
- var SubNodeArray = new Array();
- SubNodeArray = node.getChildren();
- for(var i=0;i<SubNodeArray.length;i++)
- {
- if(parseInt(SubNodeArray[i].getChildren().length)==0)
- {
- var found = false;
- if(TargetList.length!=0)
- {
- for(var l=0; l<TargetList.length;l++)
- {
- if (SubNodeArray[i].getAttribute("Text").replace(" ","") == TargetList.options[l].text)
- {
- found = true;
- break;
- }
- }
- }
- if (found != true)
- {
- TargetList.options.add(new Option(SubNodeArray[i].getAttribute("Text").replace(" ",""),SubNodeArray[i].getAttribute("ID")));
- CheckSign();
- }
- }
- else
- GetChildrenNodes(SubNodeArray[i],SubNodeArray[i].getAttribute("ID"));
- }
- }
- function RemoveFromTargetList() {
- TargetList = window.document.forms[0].Target;
- var len = TargetList.options.length;
- for(var i = (len-1); i >= 0; i--) {
- if ((TargetList.options[i] != null) && (TargetList.options[i].selected == true)) {
- TargetList.options[i] = null;
- CheckSign();
- }
- }
- }
- function RemoveAllFromTargetList() {
- TargetList = window.document.forms[0].Target;
- var len = TargetList.options.length;
- for(var i = (len-1); i >= 0; i--) {
- if (TargetList.options[i] != null) {
- TargetList.options[i] = null;
- CheckSign();
- }
- }
- }
- function CheckSign() {
- TargetList = window.document.forms[0].Target;
- var len = TargetList.options.length;
- var check = "";
- for(var i =0;i<len; i++) {
- if (TargetList.options[i] != null) {
- check += "←第"+(i+1)+"审核<br>";
- }
- }
- document.all.lb.innerHTML = check;
- }
- function BackValue() {
- TargetList = window.document.forms[0].Target;
- var len = TargetList.options.length;
- var aname = "";
- var aid = "";
- var BackValueArray = new Array();
- for(var i =0;i<len; i++) {
- if (TargetList.options[i] != null) {
- aname += "→"+TargetList.options[i].text;
- aid +="→("+TargetList.options[i].value+")";
- }
- }
- BackValueArray["name"] = aname.substring(1);
- BackValueArray["id"] = aid.substring(1);
- window.returnValue = BackValueArray;
- window.close();
- }
- </script>
- </HEAD>
- <body>
- <form id="Form1" method="post" runat="server">
- <TABLE id="Table2" style="BORDER-LEFT-COLOR: buttonface; BORDER-BOTTOM-COLOR: buttonshadow; BORDER-TOP-STYLE: solid; BORDER-TOP-COLOR: buttonface; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: buttonshadow; BORDER-BOTTOM-STYLE: solid; BORDER-MIDDLE-COLOR: WHIRE"
- borderColor="gainsboro" height="360" cellSpacing="0" cellPadding="0" width="400" align="center"
- bgColor="buttonface" border="1">
- <TR>
- <TD>
- <TABLE id="Table1" height="100%" cellSpacing="0" cellPadding="0" width="100%" align="center"
- border="0">
- <TR>
- <TH align="center" bgColor="background" colSpan="3" height="22">
- <P dir="ltr" style="FONT-WEIGHT: bold; COLOR: white; MARGIN-RIGHT: 0px; FONT-FAMILY: 宋体, 黑体"
- align="center">选择审核人</P>
- </TH>
- </TR>
- <TR>
- <TD align="center" colSpan="3" height="22"></TD>
- </TR>
- <TR>
- <TD vAlign="top" align="center" width="176" height="220">
- <DIV style="BORDER-RIGHT: buttonface 2px solid; PADDING-RIGHT: 3px; BORDER-TOP: #404040 2px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 0px; OVERFLOW: auto; BORDER-LEFT: #404040 2px solid; WIDTH: 100px; PADDING-TOP: 3px; BORDER-BOTTOM: buttonface 2px solid; HEIGHT: 220px; BACKGROUND-COLOR: white; TEXT-ALIGN: left"><iewc:treeview id="TreeView1" runat="server" ondblclick="AddToTargetList()" selectexpands="true"
- AutoSelect="True"></iewc:treeview></DIV>
- </TD>
- <TD align="center" width="15%" height="220">
- <P><INPUT id="Add" style="WIDTH: 50px" onclick="javascript:AddToTargetList();" type="button"
- value=">" name="Add"></P>
- <P><INPUT id="Remove" style="WIDTH: 50px" onclick="javascript:RemoveFromTargetList();" type="button"
- value="<" name="Remove"></P>
- <P><INPUT id="Removeall" style="WIDTH: 50px" onclick="javascript:RemoveAllFromTargetList();"
- type="button" value="<<" name="Removeall"></P>
- </TD>
- <TD vAlign="top" align="center" width="50%" height="220">
- <table>
- <tr>
- <td style="HEIGHT: 100%" vAlign="top">
- <P><asp:listbox id="Target" ondblclick="javascript:RemoveFromTargetList()" runat="server" Width="80px"
- Height="220px"></asp:listbox>
- </P>
- </td>
- <td style="MARGIN-TOP: 2px" vAlign="top">
- <asp:Label id="lb" Font-Size="9pt" runat="server"></asp:Label>
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- <TR>
- <TD align="center" width="100%" colSpan="3" height="50">
- <P><INPUT type="button" value="提交" onclick="BackValue()"><INPUT id="Reset" type="button" onclick="javascript:window.close()" value="取消"></P>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </form>
- </body>
- </HTML>