UserUpdata.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:12k
- <%@ page language="C#" autoeventwireup="true" inherits="SysManage_UserUpdata, App_Web_2n6c6zuv" 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">
- <base target="_self" ></base>
- <title>修改用户</title>
- <script language="javascript" type="text/javascript">
- <!--
- 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("TB_UserRole").innerText;
- var RoleIDValue=document.getElementById("txt_RoleID").innerText;
- for(i=0;i<ListBox2Object.options.length;i++)
- {
- var strText=ListBox2Object.options[i].text;
- var strValue=ListBox2Object.options[i].value;
- UserRoleText=UserRoleText + strText + ",";
- RoleIDValue=RoleIDValue + strValue + ",";
- }
- document.getElementById("TB_UserRole").innerText=UserRoleText;
- document.getElementById("txt_RoleID").innerText=RoleIDValue;
-
- }
-
- }
- function AddItemAll(ListBox2Object,ListBox1Object)//添加全部
- {
- document.getElementById("txt_RoleID").innerText="";
- document.getElementById("TB_UserRole").innerText="";
- for(i=ListBox2Object.options.length-1;i>=0;i--)
- {
- ListBox2Object.options.remove(i);
-
- }
- var UserRoleText=document.getElementById("TB_UserRole").innerText;
- var RoleIDValue=document.getElementById("txt_RoleID").innerText;
- 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 + ",";
-
- }
- document.getElementById("TB_UserRole").innerText=UserRoleText;
- document.getElementById("txt_RoleID").innerText=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("txt_RoleID").innerText;
-
- var UserRoleText=document.getElementById("TB_UserRole").innerText;
- var RoleIDValue=document.getElementById("txt_RoleID").innerText;
- for(i=0;i<ListBox2Object.options.length;i++)
- {
- var strText=ListBox2Object.options[i].text;
- var strValue=ListBox2Object.options[i].value;
- UserRoleText=UserRoleText + strText + ",";
- RoleIDValue=RoleIDValue + strValue + ",";
- }
- document.getElementById("TB_UserRole").innerText=UserRoleText;
- document.getElementById("txt_RoleID").innerText=RoleIDValue;
- }
- }
- function DelAllItem(ListBox2Object) //删除全部
- {
- var rows=ListBox2Object.options.length;
- for(i=rows-1;i>=0;i--)
- {
- ListBox2Object.options.remove(i);
-
- }
- document.getElementById("txt_RoleID").innerText="";
- document.getElementById("TB_UserRole").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 bgcolor="#f7f7f7">
- <form id="form1" runat="server" >
-
- <TABLE width="100%" border="0" cellPadding="0" cellSpacing="0" >
- <tr valign="middle">
- <td height="25px" width="17%" >
- <img src="../Images/assignuser.ico" height="30" >
- </td>
- <td align="left" width="83%" style="font-size:15px">
- <strong> 修改用户 </strong>
- </td>
- </tr>
- <tr>
- <td background="../Images/Menu_bg.jpg" height="20px">
- <img src="../Images/assignuser.ico" height="15px">
- </td>
- <td background="../Images/Menu_bg.jpg" align="left">
-
- </td>
- </tr>
- </TABLE>
- <TABLE width="100%" border="0" cellPadding="0" cellSpacing="0" >
- <tr>
- <td width="15%"> 账 号: </td>
- <td >
- <asp:TextBox ID="TB_Account" runat="server"></asp:TextBox>
- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="必填" ControlToValidate="TB_Account" ValidationGroup="SaveButton" Display="Dynamic"></asp:RequiredFieldValidator>
- </td>
- <td> 描 述: </td>
- <td align="left" rowspan="2">
- <asp:TextBox ID="TB_Decs" runat="server" Width="242px" TextMode="MultiLine"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td>
- 职 工:
- </td>
- <td colspan="3">
- <%-- <asp:Label ID="LB_EmpName" runat="server"></asp:Label> <br />--%>
-
- <asp:TextBox ID="TB_employe" runat="server" Enabled="false"></asp:TextBox>
- <input type="hidden" id="txt_employeid" name="txt_employeid" runat="server">
- <a href="javascript: modelesswin('EmpTree.aspx',100,100)" ID="A1" title="选择职工"><img src="image/user.gif" border="0"></a>
- <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="必填" ControlToValidate="TB_employe" ValidationGroup="SaveButton" Display="Dynamic"></asp:RequiredFieldValidator>
- </td>
-
- </tr>
- <tr>
- <td> 关联角色: </td>
- <td colspan="3"> <%--<asp:TextBox ID="TB_UserRole" runat="server" Width="160px" Enabled="false"></asp:TextBox> --%>
- <input id="TB_UserRole" type="text" runat="server" disabled="disabled" style="width:500px;" />
- <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="必填" ControlToValidate="TB_UserRole" ValidationGroup="SaveButton" Display="Dynamic"></asp:RequiredFieldValidator>
- </td>
-
- </tr>
-
- <tr>
- <td width="10px"></td>
- <td colspan="2" >
- <TABLE border="0" cellPadding="0" cellSpacing="0" >
- <tr>
- <td>待选角色</td>
- <td></td>
- <td>已选角色</td>
- </tr>
- <tr>
- <td>
- <%-- <asp:ListBox ID="LB_Role1" runat="server" Height="150px" Width="92px"><asp:ListItem Value="12" Text="12"></asp:ListItem></asp:ListBox>--%>
-
- <select id="Select1" runat="server" size="6" style="width: 90px">
-
- </select>
- </td>
- <td align="center">
- <input type="hidden" id="txt_RoleID" name="txt_RoleID" runat="server">
- <input id="BT_AddAll" type="button" runat="server" style="width:75px;" value="添加全部>>" language="javascript" onclick="AddItemAll(body.all.Select2,body.all.Select1)"/><br/>
- <input id="BT_AddOne" type="button" runat="server" style="width:75px;" value="添加>" language="javascript" onclick="AddItem(body.all.Select2,body.all.Select1)" /><br/>
-
- <input id="BT_DelOne" type="button" runat="server" style="width:75px;" value="<删除" language="javascript" onclick="DelItem(body.all.Select2)" /><br/>
-
- <input id="BT_DelAll" type="button" runat="server" style="width:75px;" value="<<删除全部" language="javascript" onclick="DelAllItem(body.all.Select2)" />
-
-
- </td>
- <td>
-
- <select id="Select2" runat="server" size="6" style="width: 90px">
-
- </select></td>
- </tr>
- </TABLE>
-
-
- </td>
-
- </tr>
-
- <tr height="2px">
- <td colspan="4" background="image/header_bg.gif"> </td>
-
- </tr>
- <tr height="10px" >
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td>
- <asp:CheckBox ID="CB_isLock" runat="server" Text="禁用"/></td>
- <td>
- <asp:CheckBox ID="CB_isIPbound" runat="server" Text="绑定IP地址"/> </td>
- <td> IP地址: </td>
- <td> <asp:TextBox ID="TB_address" runat="server" Width="160px"></asp:TextBox> </td>
- </tr>
-
- <%-- <tr>
- <td> 开始时间: </td>
-
- <td> <asp:TextBox ID="TB_FromDate" runat="server" Width="160px"></asp:TextBox> </td>
- <td> 截止时间: </td>
- <td >
- <asp:TextBox ID="TB_ToDate" runat="server" Width="160px"></asp:TextBox> </td>
- </tr> --%>
-
- <tr height="20px">
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- <tr height="2px">
- <td colspan="4" background="image/header_bg.gif"> </td>
-
- </tr>
-
- <tr>
- <td colspan="4" align="center">
-
-
- <asp:ImageButton ID="BT_Confirm" runat="server" ImageUrl="image/queding.gif" OnClick="BT_Confirm_Click" ValidationGroup="SaveButton"/>
-
- <asp:ImageButton ID="BT_Cancel" runat="server" ImageUrl="image/quxiao.gif" />
-
- </td>
- </tr>
-
- </TABLE>
-
- <input type="hidden" id="txt_password" name="txt_password" runat="server">
- </form>
- </body>
- </html>