choosestaff.jsp
来自「J2ee开发的 人事管理系统 使用oracle数据库 myeclips平台开」· JSP 代码 · 共 122 行
JSP
122 行
<%@ page language="java" pageEncoding="gb2312"%>
<%@ page import="java.util.*" %>
<%@ page import="com.galaxy.vo.*" %>
<%@ page import="com.galaxy.util.*" %>
<% request.setCharacterEncoding("gb2312"); %>
<%! String currentPage="1"; //当前显示的页面号%>
<%
HashMap upHashMap = (HashMap)request.getSession().getAttribute("upHashMap");
PageHelp pagehelp=new PageHelp();//实例化PageHelp对象pageHelp
pagehelp=(PageHelp)request.getAttribute("pagehelp");
List list=pagehelp.getObjectlist();
if(pagehelp.getCurrentpage()!=0 ){
currentPage=String.valueOf(pagehelp.getCurrentpage());
}
%>
<html>
<link rel="stylesheet" type="text/css" href="../../css/css.css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script>
function queryItem(){
document.form1.action="PD_MainDispatchServlet?opflag=staffquery";
document.form1.submit();
}
<!-- 翻页操作 -->
function changpage(currentpage){
document.condiform.currentPage.value=currentpage;
document.condiform.opflag.value='userlist';
document.condiform.submit();
return false;
}
<!--选择一条想要调动的员工方法 -->
function EditSelect()
{ var checked=0;
for(var k=0;k<document.form1.elements.length;k++){
if(document.form1.elements[k].type=="checkbox"&&document.form1.elements[k].checked==true)
{
checked+=1;
}
}
if(checked==0){
alert("请选择修改的数据!")
return false;
}
if(checked>1){
alert("一次只能操作一条记录!")
return false;
}
document.form1.action="PD_MainDispatchServlet?opflag=choose";
document.form1.submit();
}
</script>
<%
List deptlist=new ArrayList();
deptlist=(ArrayList)request.getAttribute("deptlist");
%>
<body>
<h2 align="center">选择员工
</h2>
<p align="center"> </p>
<form name="form1" method="post">
<table width="100%" border="1" cellspacing="1" cellpadding="0" align="center" class="toBeSetBgColor">
<tr>
<td width="20%" height="25" align="center">姓名</td>
<td width="20%" align="center"><input name="username" type="text" size="20"></td>
<td width="20%" align="center"><input name="button" type="button" id="button" value=" 查 询 " onClick="queryItem()"></td>
</tr>
<tr class="RowHeader">
<td height="25" align="center" >姓名</td>
<td align="center">年龄</td>
<td align="center">部门</td>
<td align="center">员工号</td>
<td align="center">选择</td>
</tr>
<%if(list!=null){
for(int i=0;i<list.size();i++){
UserInfoVO uservo=(UserInfoVO)list.get(i); %>
<!--设置输出表格格式和鼠标指向表格时的颜色变化-->
<tr <%if(i%2==1){%>class="OddRow"<%}
else{%>class="EvenRow"<%} %> onMouseOver="this.style.backgroundColor='white'"
onMouseOut="this.style.backgroundColor=''">
<td height="25" align="center" ><%=uservo.getUiRealname() %></td>
<td align="center"><%=uservo.getUiAge() %></td>
<td align="center"><%=uservo.getDeptInfo().getDiName() %></td>
<td align="center"><%=uservo.getUiPersonid()%></td>
<td align="center"><input type="checkbox" name="checkbox" value="<%=uservo.getUiId()%>"></td>
<%}} %>
</tr>
<tr>
<td height="25"> </td>
<td> </td>
<td align="center"><input name="button" type="button" id="button" value=" 提 交 " onClick="EditSelect()"></td>
<td> </td>
<td align="center"> </td>
</tr>
</table>
</form>
<form name="condiform" action="PD_MainDispatchServlet" method="post">
<input type="hidden" name="opflag" value=""/>
<input type="hidden" name="flag" value=""/>
<input type="hidden" name="currentPage" value="<%=currentPage%>"/>
<input type="hidden" name="condition" value="<%=pagehelp.getCondition()%>"/>
<table align=center border=0 width=90% bordercolorlight=#3399ff
bordercolordark=#3399ff cellspacing=0 cellpadding=0>
<%if(list.size()!=0){ %>
<tr>
<td align=center width=10% height=25><%=pagehelp.getPagebar()%></td>
</tr>
<%}else{ %>
<tr>
<td align=center width=10% height=25 >没有符合条件的信息</td>
</tr>
<%} %>
</table>
</form>
<p align="center"> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?