📄 accountupdate.jsp
字号:
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="role" class="src.com.RoleRight" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<html>
<head>
<title>部门信息列表</title>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<%! String mode;%>
<%
String accountId = request.getParameter("accountId");
mode = request.getParameter("mode");
if (request.getParameter("update")!=null && mode.equals("update") ){
account.setGlobal(global);
%>
<jsp:setProperty name="account" property="*" />
<%
int rtcode = account.update();
if(rtcode >= 0) {
%>
<jsp:forward page="AccountUpdate.jsp">
<jsp:param name="accountId" value="<%=accountId%>" />
<jsp:param name="mode" value="ok" />
</jsp:forward>
<%
}else {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
}
}
int count = account.load(accountId);
if (count <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-103" />
</jsp:forward>
<%
}
%>
<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<blockquote><br>
<br><form method="post" action="AccountUpdate.jsp">
<input type="hidden" name="mode" value="update" />
<table width="73%" border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" cellpadding="0" cellspacing="0">
<tr bgcolor="#949b93" align="center" class="text">
<td class="Text1" height="19" width="16%">
<div align="center"><b>帐号</b></div>
</td>
<td class="Text1" height="19" width="36%">
<div align="center"><b>密码</b></div>
</td>
<td class="Text1" height="19" width="21%">
<div align="center"><b>职员姓名</b></div>
</td>
<td class="Text1" height="19" width="17%">
<div align="center"><b>角色描述</b></div>
</td>
<td class="Text1" height="19" width="10%">
<div align="center"><b> </b></div>
</td>
</tr>
<tr>
<td class="textb" width="16%">
<input type="hidden" name="accountId" value="<%= account.getAccountId()%>">
<%= account.getAccountId()%></td>
<td class="textb" width="36%">
<input type="password" name="password" value="<%= account.getPassword()%>">
</td>
<td class="textb" width="21%"><%= account.getEmpName()%></td>
<td class="textb" width="17%">
<select name="roleId">
<%
role.query("", "");
while (role.next() == 1){
%>
<option value="<%=role.getRoleId()%>" <%if ((role.getRoleId())==(account.getRoleId())){%> selected <%}%>>
<%=role.getRoleName()%> </option>
<%
}
%>
</select>
</td>
<td class="textb" width="10%">
<input type="submit" name="update" value="修改">
</td>
</tr>
</table>
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -