⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modu3main.jsp

📁 采用Jsp,Javabean,Servlet等做的人力资源管理系统,后台管理用户及密码均是:admin
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%@ page import="userbean.Tnote" %>
<%@ page import="dbmgr.*" %>
<%@ page import="java.util.*" %>
<% request.setCharacterEncoding("gb2312"); %>  
 <%
  String sch=(String)request.getAttribute("sch");
  int end;
 TnoteMgr userdb=new TnoteMgr();
 Collection rs=null;
 Collection sall=userdb.getAll();
 
if(request.getAttribute("rss")==null)
{
 rs=sall;
}
else 
rs=(Collection)request.getAttribute("rss");
Iterator it=rs.iterator();

if(sch==null) 
     {end=sall.size();
      sch="0";
     } 
  else end=rs.size();
int cout=(end%8==0)?(end/8):(end/8+1);
int endpage=(end%8==0)?(end-7):(end-end%8+1);
int sc=Integer.parseInt(sch); 
String startPage=(String)request.getAttribute("stat");
//System.out.println(startPage);
if(startPage==null)startPage="1";
int currentPage=Integer.parseInt(startPage);
int currentcout=(currentPage%8==0)?(currentPage/8):(currentPage/8+1);

%>
<br><br> 


<script language="javascript">
function _Show()
{document.forms[0].opraParam.value="showall";
 document.register.submit();
}
function _search()
  {  
   if(document.register.name1.value==""&& document.register.name2.value==""&& document.register.name3.value=="" )
       window.alert("请输入查询条件!!");
     else
     {if(document.register.name1.value!="" ) 
        document.register.sqlCondition.value=" and pxid="+document.register.name1.value+ "";
      if(document.register.name2.value!="" )
            document.register.sqlCondition.value+=" and leibieid="+document.register.name2.value+ "";
      if(document.register.name3.value!="")
         document.register.sqlCondition.value+=" and traincm='"+document.register.name3.value+"'";
      document.register.opraParam.value="show";
      document.register.submit();
      }
 }
function _Show()
{document.forms[0].opraParam.value="showall";
 document.register.submit();
}
 function _delete(pxid)
 {
 if(confirm("你确定要删除吗?"))
 {
   document.register.sqlCondition.value=pxid;
   document.forms[0].opraParam.value="delete";
   document.register.submit();
 }
 else
 return false;
 }
 function _goto(n)
{document.forms[0].opraParam.value="page";
 document.register.chpage.value=n;
 document.register.submit();
}
</script>
<style type="text/css">
<!--

.style1 {color:#FF9966}
-->
</style>
<center>
<form name="register" method="POST" action="/Myproject/qtTnoteServlet"> 
 <input type="hidden" name="opraParam" value=""/>
 <input type="hidden" name="sqlCondition" value=""/>
 <input type="hidden" name="chpage" value=""/>
 <input type="hidden" name="size" value="8"/>
 <%
  System.out.println(currentPage);
 int next=currentPage+8;
 int last=currentPage-8;
 if(last<=0)last=1;
 if(next>=endpage)next=endpage;
  %>
 <p align="center" class="style1"> <font size="6" color="black">培训记录</font></p>
 员工ID:<input type="text" name="name1" size=12>&nbsp;培训ID:<input type="text" name="name2" size=12>&nbsp; 课程名:<input type="text" name="name3" size=12>&nbsp;<input type="button" name="Submit1" value="查询" onClick="_search()"> 
<hr>
<%if(cout<2){%>
   <br>第一页&nbsp;&nbsp;&nbsp; &nbsp;上一页&nbsp;&nbsp;&nbsp;&nbsp;
  下一页 &nbsp;&nbsp;&nbsp;&nbsp;最后一页
<%}else if(currentcout==1){%> 
 <br>首页&nbsp;&nbsp;&nbsp; &nbsp;上一页&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onClick="_goto(<%=next %>)">下一页</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onClick="_goto(<%=endpage %>)">尾页</a> 
<%}else if(currentcout<cout){ %>
<br><a href="#" onClick="_goto(1)">首页</a>&nbsp;&nbsp;&nbsp; &nbsp;
<a href="#" onClick="_goto(<%=last %>)">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onClick="_goto(<%=next %>)">下一页</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onClick="_goto(<%=endpage %>)">尾页</a>
<%}else{ %>
<br><a href="#" onClick="_goto(1)">首页</a>&nbsp;&nbsp;&nbsp; &nbsp;
<a href="#" onClick="_goto(<%=last %>)">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
下一页 &nbsp;&nbsp;&nbsp;&nbsp;尾页
<%} %>
 <table border="1" bordercolor="#9AE4E9" cellspacing="0" >
 <tr  height="14" bgcolor="#CCCCCC">
 <th width=8%" >培训人ID</th>
 <th width="8%">培训人姓名</th>
 <th width="8%">培训ID</th>
 <th width="8%">所属部门</th>
 <th width="8%">开始时间</th>
 <th width="8%">结束时间</th>
 <th width="8%"> 课程名</th>
 <th width="8%">培训成绩</th>
 <th width="8%">培训机构</th>
 <th width="8%">课时</th>
 <th width="8%">是否合格</th>
  <th width="8%">备注</th>
  
 </tr>

 <%
  Tnote tnote=null;
  int i=1;
  int n=1;
   while(it.hasNext()&&i<=8)
   {i++;
   tnote=(Tnote)it.next();
   if(n==0){n=1;%>
   <tr bgcolor="#FFFFCC" align="center">
   <%}else{n=0;%>
   <tr align="center">
   <%}%>
    <td><%=tnote.getPxid() %></td>
    <td><%=tnote.getTname() %></td>
    <td><%=tnote.getLeibieid() %></td>
    <td><%=tnote.getDept() %></td>
    <td><%=tnote.getStarttime() %></td>
    <td><%=tnote.getEndtime() %></td>
    <td><%=tnote.getTraincm() %></td>
    <td><%=tnote.getTgrade() %></td>
    <td><%=tnote.getTorgan() %></td>
    <td><%=tnote.getKeshi()%></td>
    <td><%=tnote.getIsover() %></td>
    <td><%=tnote.getBeizhu() %></td>
   
   </tr>
   <%}%>
   </table>
   <%if(sc==1){%>
               <font size="4" color="#FF00FF">没有找到符合条件的记录</font><br>
  <%}else{%>
   当前是第<%=currentcout %>页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一共<%=cout %>页
 <%} %>
 </form>
 <form >

    <%if(sc!=0){ %>    
    <a href="/Myproject/qtmokuai3mgr/modu3main.jsp">[返回]</a>  
    <%} %>
 </form>
 </center>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -