EntertainUserManagerSetting.aspx
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:14k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="EntertainUserManagerSetting.aspx.cs" Inherits="Entertain_EntertainUserManagerSetting" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <link href="../css/main.css" type="text/css" rel="stylesheet">
- </head>
- <script>function DoSelectionList(parrLeftListBox,pstrLeftItems)
- {
- to_select = document.getElementById(parrLeftListBox);
- option_count_to = to_select.length;
- to_values = "";
- // pass on the number of selections
- //修改,支持IE & Firefox
- if(window.navigator.appName.toLowerCase().indexOf('netscape') > -1)
- lobjAantal = document.getElementsByName(pstrLeftItems)[0];
- else
- lobjAantal = document.getElementById(pstrLeftItems);
- //alert(document.getElementsByName(pstrLeftItems)[0]);
- //alert(document.getElementsByName(pstrLeftItems));
- lobjAantal.value = option_count_to;
- // Walk through the 'to'-selectionlist for making a 'comma-seperatedlist' of all the options in 'to'-selectionlist.
- for(i=0; i < option_count_to; i++)
- {
- // When there is more then n option in the 'to'-selectionlist, put a tab behind it.
- if(i > 0)
- to_values += 'f'
- // String now looks like Text1,Value1fText2,Value2
- to_values += to_select.options[i].text;
- to_values += ',';
- to_values += to_select.options[i].value;
- }
- lobjAantal.value = to_values;
- }
- //http://www.codeproject.com/jscript/iliasorter.asp
- function up(obj) {
- obj = (typeof obj == 'string') ? document.getElementById(obj) : obj;
- if (obj.tagName.toLowerCase() != 'select' && obj.length < 2)
- return false;
- var sel = new Array();
- for (var i=0; i<obj.length; i++) {
- if (obj[i].selected == true) {
- sel[sel.length] = i;
- }
- }
- for (i in sel) {
- if (sel[i] != 0 && !obj[sel[i]-1].selected) {
- var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value, obj[sel[i]-1].style.color, obj[sel[i]-1].style.backgroundColor, obj[sel[i]-1].className, obj[sel[i]-1].id);
- obj[sel[i]-1].text = obj[sel[i]].text;
- obj[sel[i]-1].value = obj[sel[i]].value;
- obj[sel[i]-1].style.color = obj[sel[i]].style.color;
- obj[sel[i]-1].style.backgroundColor = obj[sel[i]].style.backgroundColor;
- obj[sel[i]-1].className = obj[sel[i]].className;
- obj[sel[i]-1].id = obj[sel[i]].id;
- obj[sel[i]].text = tmp[0];
- obj[sel[i]].value = tmp[1];
- obj[sel[i]].style.color = tmp[2];
- obj[sel[i]].style.backgroundColor = tmp[3];
- obj[sel[i]].className = tmp[4];
- obj[sel[i]].id = tmp[5];
- obj[sel[i]-1].selected = true;
- obj[sel[i]].selected = false;
- }
- }
- }
- //http://www.codeproject.com/jscript/iliasorter.asp
- function down(obj) {
- obj = (typeof obj == 'string') ? document.getElementById(obj) : obj;
- if (obj.tagName.toLowerCase() != 'select' && obj.length < 2)
- return false;
- var sel = new Array();
- for (var i=obj.length-1; i>-1; i--) {
- if (obj[i].selected == true) {
- sel[sel.length] = i;
- }
- }
- for (i in sel) {
- if (sel[i] != obj.length-1 && !obj[sel[i]+1].selected) {
- var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value, obj[sel[i]+1].style.color, obj[sel[i]+1].style.backgroundColor, obj[sel[i]+1].className, obj[sel[i]+1].id);
- obj[sel[i]+1].text = obj[sel[i]].text;
- obj[sel[i]+1].value = obj[sel[i]].value;
- obj[sel[i]+1].style.color = obj[sel[i]].style.color;
- obj[sel[i]+1].style.backgroundColor = obj[sel[i]].style.backgroundColor;
- obj[sel[i]+1].className = obj[sel[i]].className;
- obj[sel[i]+1].id = obj[sel[i]].id;
- obj[sel[i]].text = tmp[0];
- obj[sel[i]].value = tmp[1];
- obj[sel[i]].style.color = tmp[2];
- obj[sel[i]].style.backgroundColor = tmp[3];
- obj[sel[i]].className = tmp[4];
- obj[sel[i]].id = tmp[5];
- obj[sel[i]+1].selected = true;
- obj[sel[i]].selected = false;
- }
- }
- }
- // ------------------------------------------------------------------
- function getSelectedValues(parrLeftListBox,pstrLeftItems,parrRightListBox,pstrRightItems)
- {
- form = document.Form1;
- DoSelectionList(parrLeftListBox, pstrLeftItems);
- // Now the other listbox
- DoSelectionList(parrRightListBox, pstrRightItems);
- }
- // ------------------------------------------------------------------
- function moveSelected(pstrSelListBoxName,pstrNotSelListBoxName, bCopyLeft, bCopyRight)
- {
- form = document.forms[0]//.Form1;
- to_element = form.elements[pstrSelListBoxName];
- from_select = document.getElementById(pstrNotSelListBoxName);
- to_select = document.getElementById(pstrSelListBoxName);
- option_count_from = from_select.length;
- // Has something been selected?
- if(from_select.selectedIndex > -1)
- {
- index = 0;
- selected_from_options = new Array();
- // Which options are selected within the 'from'-selectionlist.
- for(i = option_count_from-1; i > -1; i--)
- {
- // Option selected?
- if(from_select.options[i].selected && from_select.options[i].title != "disabled")
- {
- if((pstrSelListBoxName == 'pklMyTable_Right') && (from_select.options[i].text.indexOf('必选') > -1))
- return;
- // Calculate the number of (to do) selectable options within the 'to'-selectionlist.
- option_count_to = to_select.length;
- // Make a new 'OPTION'-object
- if (!bCopyRight)
- {
- new_option = document.createElement("OPTION");
- // Add this 'OPTION'-object to the 'to'-selectionlist.
- to_element.options.add(new_option, option_count_to);
- // Add the selected option from the 'from'-selectionlist to the 'to'-selectionlist.
- to_select.options[option_count_to].text = from_select.options[i].text;
- to_select.options[option_count_to].value = from_select.options[i].value;
- // Add it to the list of selected options.
- }
- selected_from_options[index++] = i;
- }
- }
- // Solution for Internet Explorer, When the number of selected options is bigger than what can be shown on screen!
- if(index > from_select.size)
- from_select.click();
- if (!bCopyLeft || bCopyRight)
- {
- // Delete the selected option(s) from the 'from'-selectionlist.
- for(i = 0; i < index; i++)
- {
- from_select.remove(selected_from_options[i]);
- }
- }sortMover(to_select);}
- }
- function moveAll(pstrSelListBoxName,pstrNotSelListBoxName, bCopyLeft, bCopyRight)
- {
- form = document.Form1;
- to_element = form.elements[pstrSelListBoxName];
- from_select = document.getElementById(pstrNotSelListBoxName);
- to_select = document.getElementById(pstrSelListBoxName);
- option_count_from = from_select.length;
- // Calculate the number of (to do) to be selected options within the 'from'-selectionlist.
- var inx=0;
- for(i=0; i < option_count_from; i++)
- {
- if(from_select.options[0].title != "disabled")
- {
- if (!bCopyRight)
- {
- // Make a new 'OPTION'-object
- new_option = document.createElement("OPTION");
- // Bepaal waarin de 'to'-selectielijst de opties van de 'from'-selectielijst moeten worden toegevoegd.
- option_count_to = to_select.length;
- // Add this 'OPTION'-object to the 'to'-selectionlist.
- to_element.options.add(new_option, option_count_to);
- // Add the first option from the 'from'-selectionlist to the 'to'-selectionlist.
- to_select.options[option_count_to].text = from_select.options[inx].text;
- to_select.options[option_count_to].value = from_select.options[inx].value;
- }
- if (!bCopyLeft)
- {
- // delete the option from the 'from'-selectionlist.
- from_select.remove(0);
- }
- else
- {
- inx++;
- }
- }
- }sortMover(to_select);}
- // sort function for the multiselect boxes
- function sortMover(mover)
- {
- // Temporary array for the sorting of the mover.
- temp = new Array();
- // When there is nothing in the mover, do nothing.
- if(mover.options != null)
- {
- // Copy the options from the mover to the temporary array.
- for(i = 0; i < mover.options.length; i++)
- temp[temp.length] = new Option(mover.options[i].text, mover.options[i].value, mover.options[i].defaultSelected, mover.options[i].selected);
- // Sort temporary array.
- if(temp.length != 0)
- temp.sort(function(a,b)
- {
- if((a.text+"").toUpperCase() < (b.text+"").toUpperCase())
- return -1;
- if((a.text+"").toUpperCase() > (b.text+"").toUpperCase())
- return 1;
- return 0;
- })
- // Copy temporary array to the mover.
- for(i = 0; i < temp.length; i++)
- mover.options[i] = new Option(temp[i].text, temp[i].value, temp[i].defaultSeleted, temp[i].selected);
- }
- function moveOptionUp(obj) {
- if (!hasOptions(obj)) { return; }
- for (i=0; i<obj.options.length; i++) {
- if (obj.options[i].selected) {
- if (i != 0 && !obj.options[i-1].selected) {
- swapOptions(obj,i,i-1);
- obj.options[i-1].selected = true;
- }
- }
- }
- }
- function moveOptionDown(obj) {
- if (!hasOptions(obj)) { return; }
- for (i=obj.options.length-1; i>=0; i--) {
- if (obj.options[i].selected) {
- if (i != (obj.options.length-1) && ! obj.options[i+1].selected) {
- swapOptions(obj,i,i+1);
- obj.options[i+1].selected = true;
- }
- }
- }
- }
- }</script>
- <SCRIPT language="JavaScript" src="../js/calendar.js"></SCRIPT>
- <body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
- <form runat="server" id="fm1">
- <br>
- <table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center"
- border="0">
- <tr>
- <th colspan="3" style="height: 25px">
- 接待员设置</th>
- </tr>
- <tr>
- <td class="usertablerow2" align="left" style="height: 32px;" colspan="2">
- <div id="pnlMain">
- <TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
- <TR>
- <TD class="Small1"><IMG src="../images/manage_arrow_down.gif" align="absmiddle"><SPAN class="big3"> 指定车辆调度人员</SPAN>
- </TD>
- </TR>
- </TABLE>
- <BR>
- <TABLE class="small" cellSpacing="0" borderColorDark="#ffffff" cellPadding="2" width="600"
- align="center" borderColorLight="#000000" border="1">
- <TR class="TableHeader">
- <TD align="center" width="50%"><B>接待人员</B></TD>
- <TD align="center" width="50%"><B>备选人员</B></TD>
- </TR>
- <TR>
- <TD vAlign="top" align="center" bgColor="#cccccc" colSpan="2">
- <span id="pklOperator" style="display:inline-block;height:250px;width:600px;"><table border="0" style="DISPLAY:inline;VERTICAL-ALIGN:middle;">
- <tr>
- <td valign="middle"></td>
- <td rowspan="2"><div style="overflow:auto;width:280px"><select size="4" name="pklOperator$Left" multiple="multiple" id="pklOperator_Left" onDblClick="moveSelected('pklOperator_Right','pklOperator_Left',false,false);getSelectedValues('pklOperator_Right','__pklOperator_HiddenTextRight','pklOperator_Left','__pklOperator_HiddenTextLeft')" style="height:250px;width:800px;">
- <option value="admin">[张风个头] 系统管理员</option>
- </select></div></td>
- <td rowspan="2" align="center" width="100px"><input name="pklOperator$ctl05" type="button" value=" ← " onclick="moveSelected('pklOperator_Left','pklOperator_Right',false,false);getSelectedValues('pklOperator_Left','__pklOperator_HiddenTextLeft','pklOperator_Right','__pklOperator_HiddenTextRight')" class="SmallButton" /><br><br><input name="pklOperator$ctl06" type="button" value=" → " onclick="moveSelected('pklOperator_Right','pklOperator_Left',false,false);getSelectedValues('pklOperator_Right','__pklOperator_HiddenTextRight','pklOperator_Left','__pklOperator_HiddenTextLeft')" class="SmallButton" /><br><br><input name="pklOperator$ctl07" type="button" value="←全部" onclick="moveAll('pklOperator_Left','pklOperator_Right',false,false);getSelectedValues('pklOperator_Left','__pklOperator_HiddenTextLeft','pklOperator_Right','__pklOperator_HiddenTextRight')" class="SmallButton" /><br><br><input name="pklOperator$ctl08" type="button" value="全部→" onclick="moveAll('pklOperator_Right','pklOperator_Left',false,false);getSelectedValues('pklOperator_Right','__pklOperator_HiddenTextRight','pklOperator_Left','__pklOperator_HiddenTextLeft')" class="SmallButton" /></td>
- <td rowspan="2"><div style="overflow:auto;width:280px"><select size="4" name="pklOperator$Right" multiple="multiple" id="pklOperator_Right" onDblClick="moveSelected('pklOperator_Left','pklOperator_Right',false,false);getSelectedValues('pklOperator_Left','__pklOperator_HiddenTextLeft','pklOperator_Right','__pklOperator_HiddenTextRight')" style="height:250px;width:800px;">
- </select></div></td>
- <td valign="middle"></td>
- </tr>
- </table>
- </span></TD>
- </TR>
- <TR bgColor="#cccccc">
- <TD vAlign="top" align="center" colSpan="2">点击条目时,可以组合CTRL或SHIFT键进行多选<BR>
- </TD>
- </TR>
- </TABLE>
- </div>
- <div>
- </div>
- </td>
- </tr>
- <tr>
- <td align="center" class="usertablerow1" colspan="2">
-
- <input type="Button" id="Button2" Class="ptsbutton" value="保存" />
-
- <input type="Button" Class="ptsbutton" value="返回" OnClick="window.location='CardManager.aspx'" /><div id="Div2">
- </div> </td>
- </tr>
- </table>
- <br>
- <table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center"
- border="0">
- <tr>
- <th colspan="2">
- 使用方法</th>
- </tr>
- <tr>
- <td class="usertablerow1" align="right" width="11%">
- <strong>特殊说明</strong></td>
- <td class="usertablerow1" width="89%">
- <a href="http://www.woying.net/" target="_blank">挨个填写即可</a></td>
- </tr>
- </table>
- </form>
- </body>
- </html>