SelectReceiver.aspx
上传用户:xgw_05
上传日期:2009-12-11
资源大小:20208k
文件大小:8k
源码类别:

OA系统

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="SelectReceiver.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.SM.SelectReceiver" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>选择收信人 </title>
  6. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  7. <meta content="C#" name="CODE_LANGUAGE">
  8. <meta content="JavaScript" name="vs_defaultClientScript">
  9. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  10. <LINK href="../../css/BasicLayout.css" type="text/css" rel="stylesheet">
  11. <base target="_self">
  12. <script language="javascript">
  13. function RemoveItem(ControlName)
  14.     { 
  15. Control = null;
  16. switch (ControlName){
  17.  case "btnReceSendToLeft" : 
  18.    Control=eval("document.SelectReceiver.listSendTo");  
  19.    break;
  20.  case "btnMobileSendToLeft" : 
  21.    Control=eval("document.SelectReceiver.listMobileSendTo");  
  22.    break;
  23.   } 
  24. var j=Control.length;
  25. if(j==0) return;
  26. for(j;j>0;j--)
  27. {
  28. if(Control.options[j-1].selected==true)
  29.   Control.remove(j-1);
  30. }
  31. }
  32.    
  33. }
  34. function AddItem(ControlName)
  35. {
  36. Control = null;
  37. switch (ControlName){
  38.  case "btnReceSendToRight" : 
  39.    Control=eval("document.SelectReceiver.listSendTo");  
  40.    break;
  41.  case "btnMobileSendToRight" : 
  42.    Control=eval("document.SelectReceiver.listMobileSendTo");  
  43.    break;
  44. var i=0;
  45. listAccount=eval("document.SelectReceiver.listAccount");
  46. var j=listAccount.length;
  47. for(i=0;i<j;i++)
  48. {
  49. if(listAccount.options[i].selected==true)
  50.      
  51. Control.add(new Option(listAccount[i].text,listAccount.options[i].value));          
  52. }
  53. }
  54. }
  55. function setStatusright()
  56. {
  57. document.SelectReceiver.btnReceSendToRight.disabled = false;
  58. document.SelectReceiver.btnMobileSendToRight.disabled=false;
  59. }
  60. function setStatusleft()
  61. {
  62. document.SelectReceiver.btnReceSendToLeft .disabled =false;
  63. document.SelectReceiver.btnMobileSendToRight.disabled=false;
  64. }
  65. function PopulateData()
  66. {
  67.    if (window.dialogArguments != null) 
  68. {
  69. var parwin = window.dialogArguments;
  70. if(parwin.document.all.hdnTxtSendTo.value!="")
  71. {
  72.     Control=eval("document.SelectReceiver.listSendTo"); 
  73.    var SendToValueArray = parwin.document.all.hdnTxtSendTo.value.split(",");
  74. var SendToTxtArray = parwin.document.all.txtSendTo.value.split(",");
  75. for(i=0;i<SendToValueArray.length-1;i++)
  76. {
  77. Control.add(new Option(SendToTxtArray[i],SendToValueArray[i]));
  78. }
  79. }
  80. if(parwin.document.all.hdnTxtMobileSendTo.value!="")
  81. {
  82.     Control=eval("document.SelectReceiver.listMobileSendTo");  
  83. var MobileSendToValueArray = parwin.document.all.hdnTxtMobileSendTo.value.split(",");
  84. var MobileSendToTxtArray = parwin.document.all.txtMobileSendTo.value.split(",");
  85. for(i=0;i<MobileSendToValueArray.length-1;i++)
  86. {
  87. Control.add(new Option(MobileSendToTxtArray[i],MobileSendToValueArray[i]));
  88. }
  89. }
  90. }
  91. }
  92. function ReturnValue()
  93. {
  94. if (window.dialogArguments != null) 
  95. {
  96. var parwin = window.dialogArguments;
  97. }
  98.  var listSendToTxtStr = "";
  99.  var listSendToValueStr = "";
  100.  var listMobileSendToTxtStr = "";
  101.  var listMobileSendToValueStr = "";
  102.  var listSendToCompleteStr = "";
  103.  
  104.  listSendTo = eval("document.SelectReceiver.listSendTo"); 
  105.  listMobileSendTo = eval("document.SelectReceiver.listMobileSendTo"); 
  106.  
  107.  
  108.  for(i=0;i<listSendTo.length;i++)
  109.  {
  110.   listSendToTxtStr+=listSendTo.options[i].text+",";
  111.   listSendToValueStr+=listSendTo.options[i].value+","; 
  112.  }
  113.      parwin.document.all.MsgSend.txtSendTo.value = listSendToTxtStr;
  114.      parwin.document.all.MsgSend.hdnTxtSendTo.value = listSendToValueStr;
  115.      
  116.  for(i=0;i<listMobileSendTo.length;i++)
  117.  {
  118.   listMobileSendToTxtStr+=listMobileSendTo.options[i].text+",";
  119.   listMobileSendToValueStr+=listMobileSendTo.options[i].value+","; 
  120.  }
  121.  parwin.document.all.MsgSend.txtMobileSendTo.value = listMobileSendToTxtStr;
  122.      parwin.document.all.MsgSend.hdnTxtMobileSendTo.value = listMobileSendToValueStr;
  123.      
  124. parwin.document.all.MsgSend.txtContent.focus();
  125.      
  126. window.close();
  127. }
  128. function SaveValue()
  129. {
  130. if (window.dialogArguments != null) 
  131. {
  132. var parwin = window.dialogArguments;
  133. }
  134.  var listSendToTxtStr = "";
  135.  var listSendToValueStr = "";
  136.  var listMobileSendToTxtStr = "";
  137.  var listMobileSendToValueStr = "";
  138.  var listSendToCompleteStr = "";
  139.  
  140.  listSendTo = eval("document.SelectReceiver.listSendTo"); 
  141.  listMobileSendTo = eval("document.SelectReceiver.listMobileSendTo"); 
  142.  
  143.  
  144.  for(i=0;i<listSendTo.length;i++)
  145.  {
  146.   listSendToTxtStr+=listSendTo.options[i].text+",";
  147.   listSendToValueStr+=listSendTo.options[i].value+","; 
  148.  }
  149.      parwin.document.all.MsgSend.txtSendTo.value = listSendToTxtStr;
  150.      parwin.document.all.MsgSend.hdnTxtSendTo.value = listSendToValueStr;
  151.      
  152.  for(i=0;i<listMobileSendTo.length;i++)
  153.  {
  154.   listMobileSendToTxtStr+=listMobileSendTo.options[i].text+",";
  155.   listMobileSendToValueStr+=listMobileSendTo.options[i].value+","; 
  156.  }
  157.  parwin.document.all.MsgSend.txtMobileSendTo.value = listMobileSendToTxtStr;
  158.      parwin.document.all.MsgSend.hdnTxtMobileSendTo.value = listMobileSendToValueStr;
  159.      
  160.  
  161.      
  162. }
  163. </script>
  164. </HEAD>
  165. <body onload="PopulateData()" MS_POSITIONING="GridLayout" background="../../../Images/mailuserbg.gif">
  166. <form id="SelectReceiver" method="post" runat="server">
  167. <SELECT id="listMobileSendTo" style="Z-INDEX: 107; LEFT: 371px; WIDTH: 181px; POSITION: absolute; TOP: 248px; HEIGHT: 155px" multiple size="9" name="listMobileSendTo">
  168. </SELECT><INPUT class="buttoncss" style="Z-INDEX: 106; LEFT: 256px; WIDTH: 81px; POSITION: absolute; TOP: 251px; HEIGHT: 24px" onclick="AddItem(this.name)" type="button" value=">>>>" name="btnMobileSendToRight"><INPUT class="buttoncss" style="Z-INDEX: 105; LEFT: 256px; WIDTH: 81px; POSITION: absolute; TOP: 275px; HEIGHT: 24px" onclick="RemoveItem(this.name)" type="button" value="<<<<" name="btnMobileSendToLeft"><SELECT id="listSendTo" style="Z-INDEX: 104; LEFT: 374px; WIDTH: 182px; POSITION: absolute; TOP: 43px; HEIGHT: 161px" multiple size="10" name="listSendTo"></SELECT><INPUT class="buttoncss" style="Z-INDEX: 103; LEFT: 256px; WIDTH: 81px; POSITION: absolute; TOP: 49px; HEIGHT: 24px" onclick="AddItem(this.name)" type="button" value=">>>>" name="btnReceSendToRight"><INPUT class="buttoncss" style="Z-INDEX: 102; LEFT: 256px; WIDTH: 81px; POSITION: absolute; TOP: 73px; HEIGHT: 24px" onclick="RemoveItem(this.name)" type="button" value="<<<<" name="btnReceSendToLeft"><asp:dropdownlist id="listAccount" ondblclick="AddItem('btnReceSendToRight')" style="Z-INDEX: 101; LEFT: 73px; POSITION: absolute; TOP: 43px" runat="server" Width="148px" Height="356px" multiple onchange="setStatusright()"></asp:dropdownlist>
  169. <asp:label id="lblReceiver" style="Z-INDEX: 111; LEFT: 375px; POSITION: absolute; TOP: 18px" runat="server" Font-Size="X-Small">站内短讯</asp:label><asp:label id="lblMReceiver" style="Z-INDEX: 112; LEFT: 374px; POSITION: absolute; TOP: 225px" runat="server" Font-Size="X-Small">手机短讯</asp:label><input class="buttoncss" style="Z-INDEX: 116; LEFT: 221px; WIDTH: 61px; POSITION: absolute; TOP: 421px; HEIGHT: 24px" onclick="ReturnValue()" type="button" value="确定">
  170. <input class="buttoncss" style="Z-INDEX: 117; LEFT: 356px; WIDTH: 61px; POSITION: absolute; TOP: 421px; HEIGHT: 24px" onclick="window.close()" type="button" value="取消">
  171. <asp:DropDownList id="listDept" style="Z-INDEX: 118; LEFT: 76px; POSITION: absolute; TOP: 16px" runat="server" OnSelectedIndexChanged="DeptListChange" AutoPostBack="True"></asp:DropDownList></form>
  172. </body>
  173. </HTML>