📄 personselect1.jsp
字号:
<%@ page language="java" import="java.sql.*" contentType="text/html;charset=gb2312"%>
<jsp:useBean id="db" scope="page" class="opendb.opendb"/>
<html>
<head>
<title>人员查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<SCRIPT LANGUAGE="JavaScript">
function link(vid){
document.S_form.udp.value =vid;
document.S_form.action="personUpdI.jsp";
document.S_form.submit();
}
function del(vid){
if (confirm("Are you sure to delete?"))
{
document.S_form.del.value =vid;
document.S_form.action="personDel.jsp";
document.S_form.submit();
}
}
</script>
<body background="b.files/bj.gif">
<form id="S_form" name="S_form" method="post" action="personSelect1.jsp">
<%
//*******************在此处完善代码
String getpersonname=new String(request.getParameter("personname").getBytes("ISO8859_1"));
String sql="select * from wglPERSON where EMP_NAME like '" +"%"+getpersonname+"%"+"'";
ResultSet rs=db.executeQuery(sql);
%>
<table>
<tr>
<td bgcolor="#00FFFF">
<p align="center">人员姓名</p><td><input type=text name="personname" size="18" value="<%=getpersonname%>" maxlength="20"></td>
<td><input type=submit value="查询" name="add"></td>
</tr></table>
<table border=1 align="center" bordercolor="#008000">
<tr bgcolor="#99FFFF">
<td width="10%" height="16" >
<p align="center">人员ID</p></td>
<td width="10%" height="16">
<p align="center">人员姓名</p></td>
<td width="10%" height="16">
<p align="center">部门号</p></td>
<td width="10%" height="16">
<p align="center">性别</p></td>
<td width="5%" height="16">
<p align="center">权限</p></td>
<td width="10%" height="16">
<p align="center">婚姻状况</p></td>
<td width="10%" height="16">
<p align="center">生日</p></td>
<td width="10%" height="16">
<p align="center">用户名</p></td>
<td width="10%" height="16">
<p align="center">密码</p></td>
<td width="10%" height="16">
<p align="center">修改</p></td>
<td width="10%" height="16">
<p align="center">删除</p></td>
</tr>
<% while(rs.next())
{
String personID=rs.getString("EMP_CODE");
String personname=rs.getString("EMP_NAME");
String ID=rs.getString("EMP_DEPT");
int sex=rs.getInt("EMP_SEX");
String birthday=rs.getString("EMP_BIRTHDAY");
int web=rs.getInt("EMP_WEB");
int marry=rs.getInt("EMP_MARRY");
String username=rs.getString("EMP_USERNAME");
String password=rs.getString("EMP_PASSWORD");
%>
<tr><td width="10%" height="16" ><p align="center"><%=personID%></p></td>
<td width="10%" height="16" ><p align="center"><%=personname%></p></td>
<td width="10%" height="16" ><p align="center"><%=ID%></p></td>
<td width="10%" height="16" ><p align="center"><%if(sex==0)
{out.print("男");}
else
{out.print("女");}%></p></td>
<td width="5%" height="16" ><p align="center"><%=web%></p></td>
<td width="10%" height="16" ><p align="center"><%if(marry==0)
{out.print("是");}
else
{out.print("否");}%></p></td>
<td width="10%" height="16" ><p align="center"><%=birthday%></p></td>
<td width="10%" height="16" ><p align="center"><%=username%></p></td>
<td width="10%" height="16" ><p align="center"><%=password%></p></td>
<td align="center" width="10%"><font size="2" color="000000"><a HREF="javascript:link('<%=((String)(personID)).trim()%>')">Y</a></font></td>
<td width="9%" align="center"><font size="2" color="000000"><a HREF="javascript:del('<%=((String)(personID)).trim()%>')">Y</a></font></td>
</tr>
<%
}
%>
</table>
<input type="hidden" id="udp" name="udp">
<input type="hidden" id="del" name="del">
</form>
<p align="center"><a href="adminBack.jsp">返回</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -