• 大小: 1.31MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-13
  • 语言: Java
  • 标签: 考勤系统  web  

资源简介

用Java web 写的一个员工考勤系统。数据库为mysql。文件里有数据表。

资源截图

代码片段和文件信息

package ccit.servlet;

import java.awt.HeadlessException;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.ResultSet;
import java.sql.SQLException;

import javaBean.BasicInfoBean;
import javaBean.DBHelperBean;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.JOptionPane;

public class BasicInfoQuery extends HttpServlet {
private static final String CONTENT_TYPE = “text/html“;

// 初始化全局变量
public void init() throws ServletException {
}

// 处理 HTTP Get 请求
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(CONTENT_TYPE);
request.setCharacterEncoding(“GBK“);
response.setContentType(“texthtml;charset=GBK“);
String num = request.getParameter(“sNO“);
request.getSession().setAttribute(“sNum“num);
//System.out.print(“*****************“+num);
DBHelperBean yao = new DBHelperBean();
ResultSet rs = yao
.dbQuery(“select stuff_nostuff_namestuff_sexstuff_agestuff_nation“
+ “ stuff_bornstuff_birthplacestuff_positionstuff_worktimestuff_telstuff_address“
+ “stuff_powerstuff_photostuff_remark from Stuff_Information  where stuff_no=‘“
+ num + “‘“);
if (rs != null) {
try {
BasicInfoBean bb=new BasicInfoBean();
if(rs.next()){

bb.setStuff_no(rs.getString(“stuff_no“));
bb.setStuff_name(rs.getString(“stuff_name“));
bb.setStuff_sex(rs.getString(“stuff_sex“));
bb.setStuff_age(Integer.parseInt(rs.getString(“stuff_age“)));
bb.setStuff_born(rs.getString(“stuff_born“));
bb.setStuff_birthplace(rs.getString(“stuff_birthplace“));
bb.setStuff_worktime(rs.getString(“stuff_worktime“));
bb.setStuff_position(rs.getString(“stuff_position“));
bb.setStuff_tel(rs.getString(“stuff_tel“));
bb.setStuff_address(rs.getString(“stuff_address“));
bb.setStuff_power(rs.getString(“stuff_power“));
bb.setStuff_photo(rs.getString(“stuff_photo“));
bb.setStuff_remark(rs.getString(“stuff_remark“));
bb.setStuff_nation(rs.getString(“stuff_nation“));

    request.setAttribute(“result“ bb);

request.getSession().setAttribute(“result1“ num);

request.getRequestDispatcher(“/BasicInfo.jsp“).forward(request
response);

}else {

JOptionPane.showMessageDialog(null “暂无记录!“);
response.sendRedirect(“SInfoManage.jsp“);
 
// out.println(“ript language=‘javascript‘>“);
// out.println(“alert(‘暂无记录!‘)“);
// out.println(“
ript>“);




}
} catch (SQLException e) {
e.printStackTrace();
}


}/*else {
System.out.print(“___________________“);
JOptionPane.showMessageDialog(null “暂无记录!“);
 
// out.println(“ript langu

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        792  2015-06-25 23:51  Employee_manager1\.classpath

     文件        324  2015-06-25 22:11  Employee_manager1\.mymetadata

     文件       1760  2015-06-25 22:11  Employee_manager1\.project

     文件        500  2009-08-05 19:28  Employee_manager1\.settings\.jsdtscope

     文件        334  2015-06-25 22:11  Employee_manager1\.settings\org.eclipse.jdt.core.prefs

     文件        489  2015-06-25 22:11  Employee_manager1\.settings\org.eclipse.wst.common.component

     文件        252  2015-06-25 22:11  Employee_manager1\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2015-06-25 22:11  Employee_manager1\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2015-06-25 22:11  Employee_manager1\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1794  2009-08-05 21:49  Employee_manager1\CSS\Accessible_Design.css

     文件       1276  2009-08-05 21:50  Employee_manager1\CSS\Accessible_Text.css

     文件     493105  2015-06-25 23:51  Employee_manager1\lib\mysql-connector-java-5.0.3.jar

     文件       3367  2009-08-04 15:49  Employee_manager1\src\ccit\servlet\BasicInfoQuery.java

     文件       1278  2009-08-05 09:18  Employee_manager1\src\ccit\servlet\DelServlet.java

     文件       1485  2009-07-31 09:11  Employee_manager1\src\ccit\servlet\KaoqinQueryServlet.java

     文件       3502  2015-06-26 23:14  Employee_manager1\src\ccit\servlet\KaoqinRecordServlet.java

     文件       2411  2009-07-31 09:09  Employee_manager1\src\ccit\servlet\KaoqinTongjiServlet.java

     文件       2608  2009-07-30 10:15  Employee_manager1\src\ccit\servlet\ListServlet.java

     文件       2614  2009-08-02 09:48  Employee_manager1\src\ccit\servlet\ListServlet1.java

     文件        776  2009-07-28 15:32  Employee_manager1\src\ccit\servlet\Loginout.java

     文件       1484  2009-07-31 09:10  Employee_manager1\src\ccit\servlet\StuffQueryServlet.java

     文件       6811  2015-06-26 22:00  Employee_manager1\src\ccit\servlet\Stuff_InfoServlet.java

     文件       6881  2009-08-05 09:09  Employee_manager1\src\ccit\servlet\UpdateInfo.java

     文件       2037  2009-08-05 22:07  Employee_manager1\src\ccit\servlet\UpdatePwdServlet.java

     文件       2154  2009-08-03 14:49  Employee_manager1\src\ccit\servlet\UploadServlet.java

     文件       2637  2009-08-01 10:33  Employee_manager1\src\javaBean\BasicInfoBean.java

     文件        962  2015-06-26 23:57  Employee_manager1\src\javaBean\DBHelperBean.java

     文件       2618  2015-06-26 19:42  Employee_manager1\src\javaBean\ListBean.java

     文件       2610  2015-06-26 19:46  Employee_manager1\src\javaBean\ListBean1.java

     文件       2550  2015-06-26 20:34  Employee_manager1\src\javaBean\Stuff_InfoBean.java

............此处省略74个文件信息

评论

共有 条评论