• 大小: 2.76MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-14
  • 语言: Java
  • 标签: java学生  

资源简介

学生管理系统web。使用的是easyUI+java 基础web 即servlet 编写的管理系统 包含数据集文件。功能有学生增删改查 班级增删改查

资源截图

代码片段和文件信息

package com.java1234.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import com.java1234.model.Grade;
import com.java1234.model.PageBean;
import com.java1234.util.StringUtil;

public class GradeDao {

public ResultSet gradeList(Connection conPageBean pageBeanGrade grade)throws Exception{
StringBuffer sb=new StringBuffer(“select * from t_grade“);
if(grade!=null && StringUtil.isNotEmpty(grade.getGradeName())){
sb.append(“ and gradeName like ‘%“+grade.getGradeName()+“%‘“);
}
if(pageBean!=null){
sb.append(“ limit “+pageBean.getStart()+““+pageBean.getRows());
}
PreparedStatement pstmt=con.prepareStatement(sb.toString().replaceFirst(“and“ “where“));
return pstmt.executeQuery();
}

public int gradeCount(Connection conGrade grade)throws Exception{
StringBuffer sb=new StringBuffer(“select count(*) as total from t_grade“);
if(StringUtil.isNotEmpty(grade.getGradeName())){
sb.append(“ and gradeName like ‘%“+grade.getGradeName()+“%‘“);
}
PreparedStatement pstmt=con.prepareStatement(sb.toString().replaceFirst(“and“ “where“));
ResultSet rs=pstmt.executeQuery();
if(rs.next()){
return rs.getInt(“total“);
}else{
return 0;
}
}

/**
 * delete from tableName where field in (135)
 * @param con
 * @param delIds
 * @return
 * @throws Exception
 */
public int gradeDelete(Connection conString delIds)throws Exception{
String sql=“delete from t_grade where id in(“+delIds+“)“;
PreparedStatement pstmt=con.prepareStatement(sql);
return pstmt.executeUpdate();
}

public int gradeAdd(Connection conGrade grade)throws Exception{
String sql=“insert into t_grade values(null??)“;
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setString(1 grade.getGradeName());
pstmt.setString(2 grade.getGradeDesc());
return pstmt.executeUpdate();
}

public int gradeModify(Connection conGrade grade)throws Exception{
String sql=“update t_grade set gradeName=?gradeDesc=? where id=?“;
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setString(1 grade.getGradeName());
pstmt.setString(2 grade.getGradeDesc());
pstmt.setInt(3 grade.getId());
return pstmt.executeUpdate();
}

}

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

     文件       4400  2013-05-24 12:34  db_studentInfo.sql

     文件        836  2013-05-24 10:08  StudentInfoManage\.classpath

     文件       1050  2013-05-24 10:08  StudentInfoManage\.project

     文件        503  2013-05-24 10:08  StudentInfoManage\.settings\.jsdtscope

     文件        395  2013-05-24 10:08  StudentInfoManage\.settings\org.eclipse.jdt.core.prefs

     文件        481  2013-05-24 10:08  StudentInfoManage\.settings\org.eclipse.wst.common.component

     文件        345  2013-05-24 10:08  StudentInfoManage\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2013-05-24 10:08  StudentInfoManage\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2013-05-24 10:08  StudentInfoManage\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       3246  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\dao\GradeDao.class

     文件       4865  2013-05-24 11:32  StudentInfoManage\build\classes\com\java1234\dao\StudentDao.class

     文件       1516  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\dao\UserDao.class

     文件       1082  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\model\Grade.class

     文件        813  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\model\PageBean.class

     文件       2466  2013-05-24 10:33  StudentInfoManage\build\classes\com\java1234\model\Student.class

     文件       1073  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\model\User.class

     文件       1037  2013-05-24 10:34  StudentInfoManage\build\classes\com\java1234\util\DateUtil.class

     文件       1648  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\util\DbUtil.class

     文件       1533  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\util\JsonUtil.class

     文件        951  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\util\ResponseUtil.class

     文件        633  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\util\StringUtil.class

     文件       2540  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\GradeComboListServlet.class

     文件       3094  2013-05-24 11:37  StudentInfoManage\build\classes\com\java1234\web\GradeDeleteServlet.class

     文件       3145  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\GradeListServlet.class

     文件       3009  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\GradeSaveServlet.class

     文件       3042  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\LoginServlet.class

     文件       2493  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\StudentDeleteServlet.class

     文件       3684  2013-05-24 10:09  StudentInfoManage\build\classes\com\java1234\web\StudentListServlet.class

     文件       3553  2013-05-24 10:36  StudentInfoManage\build\classes\com\java1234\web\StudentSaveServlet.class

     文件       2299  2013-05-24 10:08  StudentInfoManage\src\com\java1234\dao\GradeDao.java

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

评论

共有 条评论