WorkFlowSelectDoc1.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:10k
- <%@ page language="C#" autoeventwireup="true" inherits="Workflow_WorkFlowSelectDoc1, App_Web_4afs73eh" theme="Normal" %>
- <!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>
- <base target="_self" />
- <link type="text/css" href="style/formbody.css" rel="stylesheet" />
- <link type="text/css" href="style/gridStyle.css" rel="Stylesheet" />
- <script language="javascript" type="text/javascript">
-
- function ReplaceBacksLash(sDoc)
- {
- var a= sDoc.split('\');
- for (var i=0;i<a.length;i++)
- {
- if (i==0)
- {
- sDoc = a[i];
- }
- else
- {
- sDoc = sDoc + "^" + a[i];
- }
- }
- // alert(sDoc);
- return sDoc;
- }
-
- function AddItem (ListBox2Object,ListBox1Object) //添加指定项
- {
- var selIndex=ListBox1Object.selectedIndex; //选定行的索引
- if(selIndex==-1)
- alert("请选择一项");
- else
- {
- var strText=ListBox1Object.options[selIndex].text;
- var strValue=ListBox1Object.options[selIndex].value;
- for(i=0;i < ListBox2Object.options.length;i++)
- {
- if(strText==ListBox2Object.options[i].text || strValue==ListBox2Object.options[i].value)
- {
- alert("不可添加重复的项!");
- return;
- }
- }
-
- var oItem=document.createElement("option");
- oItem.text=strText;
- oItem.value=strValue;
- ListBox2Object.add(oItem);
- var UserRoleText=document.getElementById("HSelectedText").innerText;
- var RoleIDValue=document.getElementById("HSelectedValue").innerText;
- for(i=0;i<ListBox2Object.options.length;i++)
- {
- var strText=ListBox2Object.options[i].text;
- strValue = ListBox2Object.options[i].value;
- //var strValue=ReplaceBacksLash(ListBox2Object.options[i].value);
- UserRoleText=UserRoleText + strText + ",";
- RoleIDValue=RoleIDValue + strValue + ",";
- }
- document.getElementById("HSelectedText").innerText=UserRoleText;
- document.getElementById("HSelectedValue").innerText=RoleIDValue;
-
- }
-
- }
- function AddItemAll(ListBox2Object,ListBox1Object)//添加全部
- {
- document.getElementById("HSelectedValue").innerText="";
- document.getElementById("HSelectedText").innerText="";
- for(i=ListBox2Object.options.length-1;i>=0;i--)
- {
- ListBox2Object.options.remove(i);
-
- }
- var UserRoleText=document.getElementById("HSelectedText").innerText;
- var RoleIDValue=document.getElementById("HSelectedValue").innerText;
- // alert(ListBox1Object.options.length);
- for(i=0;i<ListBox1Object.options.length;i++)
- {
- var strText=ListBox1Object.options[i].text;
- var strValue=ListBox1Object.options[i].value;
- ListBox2Object.options.add(new Option(strText,strValue));
- UserRoleText=UserRoleText + strText + ",";
- RoleIDValue=RoleIDValue + strValue + ",";
- // RoleIDValue=RoleIDValue + ReplaceBacksLash(strValue) + ",";
- }
- document.getElementById("HSelectedText").innerText=UserRoleText;
- document.getElementById("HSelectedValue").innerText=RoleIDValue;
- // alert(RoleIDValue);
- }
- function DelItem(ListBox2Object) //删除指定项
- {
- var selIndex=ListBox2Object.selectedIndex;
- if(selIndex==-1)
- alert("请选择一项后再删除!");
- else
- {
- var RoleTexxt= ListBox2Object.options[selIndex].text;
- ListBox2Object.options.remove(selIndex);
- var str= document.getElementById("HSelectedValue").innerText;
-
- var UserRoleText=document.getElementById("HSelectedText").innerText;
- var RoleIDValue=document.getElementById("HSelectedValue").innerText;
- for(i=0;i<ListBox2Object.options.length;i++)
- {
- var strText=ListBox2Object.options[i].text;
- var strValue=ListBox2Object.options[i].value;
- //var strValue=ReplaceBacksLash(ListBox2Object.options[i].value);
- UserRoleText=UserRoleText + strText + ",";
- RoleIDValue=RoleIDValue + strValue + ",";
- }
- document.getElementById("HSelectedText").innerText=UserRoleText;
- document.getElementById("HSelectedValue").innerText=RoleIDValue;
- }
- }
- function DelAllItem(ListBox2Object) //删除全部
- {
- var rows=ListBox2Object.options.length;
- for(i=rows-1;i>=0;i--)
- {
- ListBox2Object.options.remove(i);
-
- }
- document.getElementById("HSelectedValue").innerText="";
- document.getElementById("HSelectedText").innerText="";
- if(rows==0)
- alert("已全部删除!");
- }
- function modelesswin(url,mwidth,mheight)
- {
- var a=new Array(2);
- if (document.all&&window.print)
- { var re= window.showModalDialog(url,"","help:0;dialogWidth=350px;dialogHeight=400px,status=no;scroll=no;");
- }
- if (re!=undefined)
- {
- a= re.split(',');
- document.getElementById("TB_employe").innerText=a[1];
- document.getElementById("txt_employeid").innerText=a[0];
- }
- }
-
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
-
- <table cellspacing="0" cellpadding="0" width="480" border="0" style="text-align:center;" >
- <tr>
- <td>
- <fieldset>
- <legend style="text-align:left;">
- <img alt="本活动选择可编辑的文挡模板" src="image/DateTime.gif" style="text-align:center; border:0;"/>本活动选择可编辑的文挡模板
- </legend>
- <table>
- <tr>
- <td style="height:10; width:10;"></td>
- <td align="left" style="width:400;"></td>
- </tr>
- <tr style="height:18;">
- <td style="height:18;">
- <table>
-
- </table>
- </td>
- </tr>
- <tr style="height:18;">
- <td style="height:18;">
- <table>
- <tr>
- <td>可选择
- </td>
- <td>
-
- </td>
- <td>已选择
- </td>
- <td>
- </td>
- <td>
- </td>
- <td>
- </td>
- </tr>
- <tr>
- <td>
- <asp:listbox id="lbDoc" runat="server" Height="350px" Width="300px" SelectionMode="Multiple"
- CssClass="input"></asp:listbox>
- </td>
- <td align="center">
- <input id="HListDoc" type="hidden" name="ListDoc" runat="server"/>
- <input id="HEditDoc" type ="hidden" name ="HEditDoc" runat="server" />
- <input id="BT_AddAll" type="button" runat="server" style="width:75px;" value="添加全部>>" onclick="javascript:AddItemAll(body.all.LstDoc,body.all.lbDoc)"/><br/>
- <input id="BT_AddOne" type="button" runat="server" style="width:75px;" value="添加>" onclick="javascript:AddItem(body.all.LstDoc,body.all.lbDoc)" /><br/>
- <input id="BT_DelOne" type="button" runat="server" style="width:75px;" value="<删除" onclick="javascript:DelItem(body.all.LstDoc)" /><br/>
- <input id="BT_DelAll" type="button" runat="server" style="width:75px;" value="<<删除全部" onclick="javascript:DelAllItem(body.all.LstDoc)" />
- <input id="HSelectedValue" type="hidden" runat="server" name="HSelectedValue" />
- <input id="HSelectedText" type="hidden" runat="server" name="HSelectedText" />
- </td>
- <td>
- <asp:listbox id="LstDoc" runat="server" Height="350px" Width="300px" SelectionMode="Multiple"
- CssClass="input"></asp:listbox>
- </td>
- <%--<td>
- <asp:ImageButton id="ImgDoc" runat="server" ImageUrl="image/ch.gif" OnClick="ImgDoc_Click"></asp:ImageButton>
- </td>
- <td>
- <asp:ImageButton id="DeleteDoc" runat="server" ImageUrl="image/deleteb.gif" OnClientClick="javascript:return DeleteDoc();"></asp:ImageButton>
- </td>
- <td>
- <asp:ImageButton id="EditDoc" runat="server" ImageUrl="image/handle.gif" OnClientClick="javascript:return OpenWindowDoc();"></asp:ImageButton>
- </td>--%>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- </tr>
- <tr style="height:20px;"></tr>
- <tr>
- <td>
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tr>
- <td colspan="2" style="height:10"></td>
- </tr>
- <tr>
- <td align="right">
- <asp:ImageButton id="ImgOK" runat="server" ImageUrl="image/confirm.gif" OnClick="ImgOK_Click" ></asp:ImageButton></td>
- <td align="center">
- <asp:ImageButton id="ImgCancel" runat="server" ImageUrl="image/cancel.gif" OnClientClick="javascript:if(confirm('系统提示:您确定退出选择吗?')) window.close();"></asp:ImageButton></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </form>
- </body>
- </html>