精华内容
下载资源
问答
  • 一份比较完整的设计报告。。包含源代码。。。
  • C/C++程序设计专题实验 报告 题目学生考勤管理系统设计 班级电子信息科学与技术131 姓名邬 帅 斌 目录 TOC \o "1-5" \h \z \o "Current Document" 目录 1 摘要 2 1.设计要求和目的 错误未定义书签 \o "Current ...
  • 课程设计说明书 课程设计名称 课程设计题目 学 院 名 称 数据库系统课程设计 学生考勤管理系统 信息工程学院 专业 计算机科学与技术 班级 100451 学号 10045124 评分 姓名 教师 邬荣飞 胡建明 付峥 20 13 年 1 月 8 ...
  • 课程设计说明书 课程设计名称 数据库系统课程设计 课程设计题目 学生考勤管理系统 学 院 名 称 信息工程学院 专业 计算机科学与技术 班级 100451 学号 姓名 邬荣飞 评分 教师 胡建明 付峥 20 13 年 1 月 8 日 由每位...
  • 学生考勤管理系统设计文档.
  • JavaWeb学生考勤管理系统设计论文
  • 基于ASP.NET的学生考勤管理系统设计与实现基于ASP.NET的学生考勤管理系统设计与实现基于ASP.NET的学生考勤管理系统设计与实现
  • 设计题目:学生考勤管理系统 已知技术参数和设计要求: 1. 问题描述: 在学生考勤管理系统中,考勤信息记录了学生的缺课情况,它包括:缺课日期、第几节课、课程名称、学生姓名、缺课类型(迟到、早退、请假...
  • 学生考勤管理系统,包括: 一.设计任务书 二.背景分析 三.问题描述 四.可行性分析 五.需求分析 六.数据字典 七.系统开发工具 八.总体设计 九.详细设计建立数据库 十.个人总结 一.参考文献…………… 自己...
  • 高校学生考勤管理系统设计和实现 高校学生考勤管理系统设计和实现mysql数据库创建语句 高校学生考勤管理系统设计和实现oracle数据库创建语句 高校学生考勤管理系统设计和实现sqlserver数据库创建语句 高校学生考勤...

    高校学生考勤管理系统设计和实现

    高校学生考勤管理系统设计和实现mysql数据库创建语句
    高校学生考勤管理系统设计和实现oracle数据库创建语句
    高校学生考勤管理系统设计和实现sqlserver数据库创建语句
    高校学生考勤管理系统设计和实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计
    高校学生考勤管理系统设计和实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计
    高校学生考勤管理系统设计和实现登录注册界面
    高质量编程视频:shangyepingtai.xin
    高校学生考勤管理系统设计和实现mysql数据库版本源码:
    超级管理员表创建语句如下:

    create table t_admin(
    id int primary key auto_increment comment ‘主键’,
    username varchar(100) comment ‘超级管理员账号’,
    password varchar(100) comment ‘超级管理员密码’
    ) comment ‘超级管理员’;
    insert into t_admin(username,password) values(‘admin’,‘123456’);
    SQLCopy
    班级表创建语句如下:

    create table t_bj(
    id int primary key auto_increment comment ‘主键’,
    bjName varchar(100) comment ‘班级’
    ) comment ‘班级’;
    SQLCopy
    考勤通报表创建语句如下:

    create table t_gg(
    id int primary key auto_increment comment ‘主键’,
    title varchar(100) comment ‘标题’,
    content varchar(100) comment ‘说明’,
    xm varchar(100) comment ‘姓名’,
    showDate datetime comment ‘日期’
    ) comment ‘考勤通报’;
    SQLCopy
    学生考勤表创建语句如下:

    create table t_kq(
    id int primary key auto_increment comment ‘主键’,
    studentId int comment ‘学生’,
    types varchar(100) comment ‘类型’,
    showDate datetime comment ‘日期’
    ) comment ‘学生考勤’;
    SQLCopy
    老师考勤表创建语句如下:

    create table t_lskq(
    id int primary key auto_increment comment ‘主键’,
    teacherId int comment ‘老师’,
    types varchar(100) comment ‘类型’,
    showDate datetime comment ‘日期’
    ) comment ‘老师考勤’;
    SQLCopy
    请假表创建语句如下:

    create table t_qj(
    id int primary key auto_increment comment ‘主键’,
    studentId int comment ‘用户’,
    title varchar(100) comment ‘说明’,
    qjDate datetime comment ‘开始日期’,
    days int comment ‘天数’,
    status varchar(100) comment ‘状态’
    ) comment ‘请假’;
    SQLCopy
    学生表创建语句如下:

    create table t_student(
    id int primary key auto_increment comment ‘主键’,
    username varchar(100) comment ‘账号’,
    password varchar(100) comment ‘密码’,
    studentName varchar(100) comment ‘姓名’,
    age varchar(100) comment ‘年龄’,
    sex varchar(100) comment ‘性别’,
    phone varchar(100) comment ‘电话’,
    pic varchar(100) comment ‘头像’,
    bjId int comment ‘班级’,
    yxId int comment ‘院系’
    ) comment ‘学生’;
    SQLCopy
    老师表创建语句如下:

    create table t_teacher(
    id int primary key auto_increment comment ‘主键’,
    username varchar(100) comment ‘账号’,
    password varchar(100) comment ‘密码’,
    teacherName varchar(100) comment ‘姓名’,
    age varchar(100) comment ‘年龄’,
    sex varchar(100) comment ‘性别’,
    phone varchar(100) comment ‘电话’,
    pic varchar(100) comment ‘头像’,
    bjId int comment ‘班级’,
    yxId int comment ‘院系’
    ) comment ‘老师’;
    SQLCopy
    校领导表创建语句如下:

    create table t_xld(
    id int primary key auto_increment comment ‘主键’,
    username varchar(100) comment ‘账号’,
    password varchar(100) comment ‘密码’,
    yldName varchar(100) comment ‘姓名’,
    age varchar(100) comment ‘年龄’,
    sex varchar(100) comment ‘性别’,
    phone varchar(100) comment ‘电话’,
    pic varchar(100) comment ‘头像’
    ) comment ‘校领导’;
    SQLCopy
    院领导表创建语句如下:

    create table t_yld(
    id int primary key auto_increment comment ‘主键’,
    username varchar(100) comment ‘账号’,
    password varchar(100) comment ‘密码’,
    yldName varchar(100) comment ‘姓名’,
    age varchar(100) comment ‘年龄’,
    sex varchar(100) comment ‘性别’,
    phone varchar(100) comment ‘电话’,
    pic varchar(100) comment ‘头像’,
    yxId int comment ‘院系’
    ) comment ‘院领导’;
    SQLCopy
    院系表创建语句如下:

    create table t_yx(
    id int primary key auto_increment comment ‘主键’,
    yxName varchar(100) comment ‘院系’
    ) comment ‘院系’;
    SQLCopy
    高校学生考勤管理系统设计和实现oracle数据库版本源码:
    超级管理员表创建语句如下:

    create table t_admin(
    id integer,
    username varchar(100),
    password varchar(100)
    );
    insert into t_admin(id,username,password) values(1,‘admin’,‘123456’);
    –超级管理员字段加注释
    comment on column t_admin.id is ‘主键’;
    comment on column t_admin.username is ‘超级管理员账号’;
    comment on column t_admin.password is ‘超级管理员密码’;
    –超级管理员表加注释
    comment on table t_admin is ‘超级管理员’;
    SQLCopy
    班级表创建语句如下:

    create table t_bj(
    id integer,
    bjName varchar(100)
    );
    –班级字段加注释
    comment on column t_bj.id is ‘主键’;
    comment on column t_bj.bjName is ‘班级’;
    –班级表加注释
    comment on table t_bj is ‘班级’;
    SQLCopy
    考勤通报表创建语句如下:

    create table t_gg(
    id integer,
    title varchar(100),
    content varchar(100),
    xm varchar(100),
    showDate datetime
    );
    –考勤通报字段加注释
    comment on column t_gg.id is ‘主键’;
    comment on column t_gg.title is ‘标题’;
    comment on column t_gg.content is ‘说明’;
    comment on column t_gg.xm is ‘姓名’;
    comment on column t_gg.showDate is ‘日期’;
    –考勤通报表加注释
    comment on table t_gg is ‘考勤通报’;
    SQLCopy
    学生考勤表创建语句如下:

    create table t_kq(
    id integer,
    studentId int,
    types varchar(100),
    showDate datetime
    );
    –学生考勤字段加注释
    comment on column t_kq.id is ‘主键’;
    comment on column t_kq.studentId is ‘学生’;
    comment on column t_kq.types is ‘类型’;
    comment on column t_kq.showDate is ‘日期’;
    –学生考勤表加注释
    comment on table t_kq is ‘学生考勤’;
    SQLCopy
    老师考勤表创建语句如下:

    create table t_lskq(
    id integer,
    teacherId int,
    types varchar(100),
    showDate datetime
    );
    –老师考勤字段加注释
    comment on column t_lskq.id is ‘主键’;
    comment on column t_lskq.teacherId is ‘老师’;
    comment on column t_lskq.types is ‘类型’;
    comment on column t_lskq.showDate is ‘日期’;
    –老师考勤表加注释
    comment on table t_lskq is ‘老师考勤’;
    SQLCopy
    请假表创建语句如下:

    create table t_qj(
    id integer,
    studentId int,
    title varchar(100),
    qjDate datetime,
    days int,
    status varchar(100)
    );
    –请假字段加注释
    comment on column t_qj.id is ‘主键’;
    comment on column t_qj.studentId is ‘用户’;
    comment on column t_qj.title is ‘说明’;
    comment on column t_qj.qjDate is ‘开始日期’;
    comment on column t_qj.days is ‘天数’;
    comment on column t_qj.status is ‘状态’;
    –请假表加注释
    comment on table t_qj is ‘请假’;
    SQLCopy
    学生表创建语句如下:

    create table t_student(
    id integer,
    username varchar(100),
    password varchar(100),
    studentName varchar(100),
    age varchar(100),
    sex varchar(100),
    phone varchar(100),
    pic varchar(100),
    bjId int,
    yxId int
    );
    –学生字段加注释
    comment on column t_student.id is ‘主键’;
    comment on column t_student.username is ‘账号’;
    comment on column t_student.password is ‘密码’;
    comment on column t_student.studentName is ‘姓名’;
    comment on column t_student.age is ‘年龄’;
    comment on column t_student.sex is ‘性别’;
    comment on column t_student.phone is ‘电话’;
    comment on column t_student.pic is ‘头像’;
    comment on column t_student.bjId is ‘班级’;
    comment on column t_student.yxId is ‘院系’;
    –学生表加注释
    comment on table t_student is ‘学生’;
    SQLCopy
    老师表创建语句如下:

    create table t_teacher(
    id integer,
    username varchar(100),
    password varchar(100),
    teacherName varchar(100),
    age varchar(100),
    sex varchar(100),
    phone varchar(100),
    pic varchar(100),
    bjId int,
    yxId int
    );
    –老师字段加注释
    comment on column t_teacher.id is ‘主键’;
    comment on column t_teacher.username is ‘账号’;
    comment on column t_teacher.password is ‘密码’;
    comment on column t_teacher.teacherName is ‘姓名’;
    comment on column t_teacher.age is ‘年龄’;
    comment on column t_teacher.sex is ‘性别’;
    comment on column t_teacher.phone is ‘电话’;
    comment on column t_teacher.pic is ‘头像’;
    comment on column t_teacher.bjId is ‘班级’;
    comment on column t_teacher.yxId is ‘院系’;
    –老师表加注释
    comment on table t_teacher is ‘老师’;
    SQLCopy
    校领导表创建语句如下:

    create table t_xld(
    id integer,
    username varchar(100),
    password varchar(100),
    yldName varchar(100),
    age varchar(100),
    sex varchar(100),
    phone varchar(100),
    pic varchar(100)
    );
    –校领导字段加注释
    comment on column t_xld.id is ‘主键’;
    comment on column t_xld.username is ‘账号’;
    comment on column t_xld.password is ‘密码’;
    comment on column t_xld.yldName is ‘姓名’;
    comment on column t_xld.age is ‘年龄’;
    comment on column t_xld.sex is ‘性别’;
    comment on column t_xld.phone is ‘电话’;
    comment on column t_xld.pic is ‘头像’;
    –校领导表加注释
    comment on table t_xld is ‘校领导’;
    SQLCopy
    院领导表创建语句如下:

    create table t_yld(
    id integer,
    username varchar(100),
    password varchar(100),
    yldName varchar(100),
    age varchar(100),
    sex varchar(100),
    phone varchar(100),
    pic varchar(100),
    yxId int
    );
    –院领导字段加注释
    comment on column t_yld.id is ‘主键’;
    comment on column t_yld.username is ‘账号’;
    comment on column t_yld.password is ‘密码’;
    comment on column t_yld.yldName is ‘姓名’;
    comment on column t_yld.age is ‘年龄’;
    comment on column t_yld.sex is ‘性别’;
    comment on column t_yld.phone is ‘电话’;
    comment on column t_yld.pic is ‘头像’;
    comment on column t_yld.yxId is ‘院系’;
    –院领导表加注释
    comment on table t_yld is ‘院领导’;
    SQLCopy
    院系表创建语句如下:

    create table t_yx(
    id integer,
    yxName varchar(100)
    );
    –院系字段加注释
    comment on column t_yx.id is ‘主键’;
    comment on column t_yx.yxName is ‘院系’;
    –院系表加注释
    comment on table t_yx is ‘院系’;
    SQLCopy
    oracle特有,对应序列如下:

    create sequence s_t_bj;
    create sequence s_t_gg;
    create sequence s_t_kq;
    create sequence s_t_lskq;
    create sequence s_t_qj;
    create sequence s_t_student;
    create sequence s_t_teacher;
    create sequence s_t_xld;
    create sequence s_t_yld;
    create sequence s_t_yx;
    SQLCopy
    高校学生考勤管理系统设计和实现sqlserver数据库版本源码:
    超级管理员表创建语句如下:

    –超级管理员
    create table t_admin(
    id int identity(1,1) primary key not null,–主键
    username varchar(100),–超级管理员账号
    password varchar(100)–超级管理员密码
    );
    insert into t_admin(username,password) values(‘admin’,‘123456’);
    SQLCopy
    班级表创建语句如下:

    –班级表注释
    create table t_bj(
    id int identity(1,1) primary key not null,–主键
    bjName varchar(100)–班级
    );
    SQLCopy
    考勤通报表创建语句如下:

    –考勤通报表注释
    create table t_gg(
    id int identity(1,1) primary key not null,–主键
    title varchar(100),–标题
    content varchar(100),–说明
    xm varchar(100),–姓名
    showDate datetime–日期
    );
    SQLCopy
    学生考勤表创建语句如下:

    –学生考勤表注释
    create table t_kq(
    id int identity(1,1) primary key not null,–主键
    studentId int,–学生
    types varchar(100),–类型
    showDate datetime–日期
    );
    SQLCopy
    老师考勤表创建语句如下:

    –老师考勤表注释
    create table t_lskq(
    id int identity(1,1) primary key not null,–主键
    teacherId int,–老师
    types varchar(100),–类型
    showDate datetime–日期
    );
    SQLCopy
    请假表创建语句如下:

    –请假表注释
    create table t_qj(
    id int identity(1,1) primary key not null,–主键
    studentId int,–用户
    title varchar(100),–说明
    qjDate datetime,–开始日期
    days int,–天数
    status varchar(100)–状态
    );
    SQLCopy
    学生表创建语句如下:

    –学生表注释
    create table t_student(
    id int identity(1,1) primary key not null,–主键
    username varchar(100),–账号
    password varchar(100),–密码
    studentName varchar(100),–姓名
    age varchar(100),–年龄
    sex varchar(100),–性别
    phone varchar(100),–电话
    pic varchar(100),–头像
    bjId int,–班级
    yxId int–院系
    );
    SQLCopy
    老师表创建语句如下:

    –老师表注释
    create table t_teacher(
    id int identity(1,1) primary key not null,–主键
    username varchar(100),–账号
    password varchar(100),–密码
    teacherName varchar(100),–姓名
    age varchar(100),–年龄
    sex varchar(100),–性别
    phone varchar(100),–电话
    pic varchar(100),–头像
    bjId int,–班级
    yxId int–院系
    );
    SQLCopy
    校领导表创建语句如下:

    –校领导表注释
    create table t_xld(
    id int identity(1,1) primary key not null,–主键
    username varchar(100),–账号
    password varchar(100),–密码
    yldName varchar(100),–姓名
    age varchar(100),–年龄
    sex varchar(100),–性别
    phone varchar(100),–电话
    pic varchar(100)–头像
    );
    SQLCopy
    院领导表创建语句如下:

    –院领导表注释
    create table t_yld(
    id int identity(1,1) primary key not null,–主键
    username varchar(100),–账号
    password varchar(100),–密码
    yldName varchar(100),–姓名
    age varchar(100),–年龄
    sex varchar(100),–性别
    phone varchar(100),–电话
    pic varchar(100),–头像
    yxId int–院系
    );
    SQLCopy
    院系表创建语句如下:

    –院系表注释
    create table t_yx(
    id int identity(1,1) primary key not null,–主键
    yxName varchar(100)–院系
    );
    SQLCopy
    高校学生考勤管理系统设计和实现登录后主页
    高校学生考勤管理系统设计和实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计:
    班级javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //班级
    @Table(name = “t_bj”)
    public class Bj {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //班级
    private String bjName;
    public String getBjName() {return bjName;}
    public void setBjName(String bjName) {this.bjName = bjName;}
    }
    JavaCopy
    考勤通报javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //考勤通报
    @Table(name = “t_gg”)
    public class Gg {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //标题
    private String title;
    //说明
    private String content;
    //姓名
    private String xm;
    //日期
    private Date showDate;
    public String getTitle() {return title;}
    public void setTitle(String title) {this.title = title;}
    public String getContent() {return content;}
    public void setContent(String content) {this.content = content;}
    public String getXm() {return xm;}
    public void setXm(String xm) {this.xm = xm;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    学生考勤javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //学生考勤
    @Table(name = “t_kq”)
    public class Kq {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //学生
    private Integer studentId;
    //类型
    private String types;
    //日期
    private Date showDate;
    public Integer getStudentId() {return studentId;}
    public void setStudentId(Integer studentId) {this.studentId = studentId;}
    public String getTypes() {return types;}
    public void setTypes(String types) {this.types = types;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    老师考勤javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //老师考勤
    @Table(name = “t_lskq”)
    public class Lskq {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //老师
    private Integer teacherId;
    //类型
    private String types;
    //日期
    private Date showDate;
    public Integer getTeacherId() {return teacherId;}
    public void setTeacherId(Integer teacherId) {this.teacherId = teacherId;}
    public String getTypes() {return types;}
    public void setTypes(String types) {this.types = types;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    请假javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //请假
    @Table(name = “t_qj”)
    public class Qj {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //用户
    private Integer studentId;
    //说明
    private String title;
    //开始日期
    private Date qjDate;
    //天数
    private Integer days;
    //状态
    private String status;
    public Integer getStudentId() {return studentId;}
    public void setStudentId(Integer studentId) {this.studentId = studentId;}
    public String getTitle() {return title;}
    public void setTitle(String title) {this.title = title;}
    public Date getQjDate() {return qjDate;}
    public void setQjDate(Date qjDate) {this.qjDate = qjDate;}
    public Integer getDays() {return days;}
    public void setDays(Integer days) {this.days = days;}
    public String getStatus() {return status;}
    public void setStatus(String status) {this.status = status;}
    }
    JavaCopy
    学生javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //学生
    @Table(name = “t_student”)
    public class Student {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String studentName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //班级
    private Integer bjId;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getStudentName() {return studentName;}
    public void setStudentName(String studentName) {this.studentName = studentName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getBjId() {return bjId;}
    public void setBjId(Integer bjId) {this.bjId = bjId;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    老师javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //老师
    @Table(name = “t_teacher”)
    public class Teacher {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String teacherName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //班级
    private Integer bjId;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getTeacherName() {return teacherName;}
    public void setTeacherName(String teacherName) {this.teacherName = teacherName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getBjId() {return bjId;}
    public void setBjId(Integer bjId) {this.bjId = bjId;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    校领导javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //校领导
    @Table(name = “t_xld”)
    public class Xld {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String yldName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getYldName() {return yldName;}
    public void setYldName(String yldName) {this.yldName = yldName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    }
    JavaCopy
    院领导javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //院领导
    @Table(name = “t_yld”)
    public class Yld {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String yldName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getYldName() {return yldName;}
    public void setYldName(String yldName) {this.yldName = yldName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    院系javaBean创建语句如下:

    package project.model;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Date;
    @Entity

    //院系
    @Table(name = “t_yx”)
    public class Yx {
    //主键
    @Id
    @Column(name = “id”)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //院系
    private String yxName;
    public String getYxName() {return yxName;}
    public void setYxName(String yxName) {this.yxName = yxName;}
    }
    JavaCopy
    高校学生考勤管理系统设计和实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:
    班级javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //班级
    public class Bj extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //班级
    private String bjName;
    public String getBjName() {return bjName;}
    public void setBjName(String bjName) {this.bjName = bjName;}
    }
    JavaCopy
    考勤通报javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //考勤通报
    public class Gg extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //标题
    private String title;
    //说明
    private String content;
    //姓名
    private String xm;
    //日期
    private Date showDate;
    public String getTitle() {return title;}
    public void setTitle(String title) {this.title = title;}
    public String getContent() {return content;}
    public void setContent(String content) {this.content = content;}
    public String getXm() {return xm;}
    public void setXm(String xm) {this.xm = xm;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    学生考勤javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //学生考勤
    public class Kq extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //学生
    private Integer studentId;
    //类型
    private String types;
    //日期
    private Date showDate;
    public Integer getStudentId() {return studentId;}
    public void setStudentId(Integer studentId) {this.studentId = studentId;}
    public String getTypes() {return types;}
    public void setTypes(String types) {this.types = types;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    老师考勤javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //老师考勤
    public class Lskq extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //老师
    private Integer teacherId;
    //类型
    private String types;
    //日期
    private Date showDate;
    public Integer getTeacherId() {return teacherId;}
    public void setTeacherId(Integer teacherId) {this.teacherId = teacherId;}
    public String getTypes() {return types;}
    public void setTypes(String types) {this.types = types;}
    public Date getShowDate() {return showDate;}
    public void setShowDate(Date showDate) {this.showDate = showDate;}
    }
    JavaCopy
    请假javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //请假
    public class Qj extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //用户
    private Integer studentId;
    //说明
    private String title;
    //开始日期
    private Date qjDate;
    //天数
    private Integer days;
    //状态
    private String status;
    public Integer getStudentId() {return studentId;}
    public void setStudentId(Integer studentId) {this.studentId = studentId;}
    public String getTitle() {return title;}
    public void setTitle(String title) {this.title = title;}
    public Date getQjDate() {return qjDate;}
    public void setQjDate(Date qjDate) {this.qjDate = qjDate;}
    public Integer getDays() {return days;}
    public void setDays(Integer days) {this.days = days;}
    public String getStatus() {return status;}
    public void setStatus(String status) {this.status = status;}
    }
    JavaCopy
    学生javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //学生
    public class Student extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String studentName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //班级
    private Integer bjId;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getStudentName() {return studentName;}
    public void setStudentName(String studentName) {this.studentName = studentName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getBjId() {return bjId;}
    public void setBjId(Integer bjId) {this.bjId = bjId;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    老师javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //老师
    public class Teacher extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String teacherName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //班级
    private Integer bjId;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getTeacherName() {return teacherName;}
    public void setTeacherName(String teacherName) {this.teacherName = teacherName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getBjId() {return bjId;}
    public void setBjId(Integer bjId) {this.bjId = bjId;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    校领导javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //校领导
    public class Xld extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String yldName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getYldName() {return yldName;}
    public void setYldName(String yldName) {this.yldName = yldName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    }
    JavaCopy
    院领导javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //院领导
    public class Yld extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //账号
    private String username;
    //密码
    private String password;
    //姓名
    private String yldName;
    //年龄
    private String age;
    //性别
    private String sex;
    //电话
    private String phone;
    //头像
    private String pic;
    //院系
    private Integer yxId;
    public String getUsername() {return username;}
    public void setUsername(String username) {this.username = username;}
    public String getPassword() {return password;}
    public void setPassword(String password) {this.password = password;}
    public String getYldName() {return yldName;}
    public void setYldName(String yldName) {this.yldName = yldName;}
    public String getAge() {return age;}
    public void setAge(String age) {this.age = age;}
    public String getSex() {return sex;}
    public void setSex(String sex) {this.sex = sex;}
    public String getPhone() {return phone;}
    public void setPhone(String phone) {this.phone = phone;}
    public String getPic() {return pic;}
    public void setPic(String pic) {this.pic = pic;}
    public Integer getYxId() {return yxId;}
    public void setYxId(Integer yxId) {this.yxId = yxId;}
    }
    JavaCopy
    院系javaBean创建语句如下:

    package project.model;
    import org.springframework.format.annotation.DateTimeFormat;
    import java.util.Date;

    //院系
    public class Yx extends BaseBean{
    //主键
    private Integer id;
    public Integer getId() {return id;}
    public void setId(Integer id) {this.id = id;}
    //院系
    private String yxName;
    public String getYxName() {return yxName;}
    public void setYxName(String yxName) {this.yxName = yxName;}
    }
    JavaCopy

    展开全文
  • 学生考勤管理系统课程设计文档:系统的主要功能 (1)、录入学生的缺课记录,函数代码void input(records *r){}模块中。首先提示用户按照正确的格式进行学生缺课记录的录入,这个步骤比较简单,只需要不断地将记录的...
  • 功能要求:试设计考勤管理系统,使之能提供以下功能:  录入学生的缺课记录;  修改某个学生的缺课记录;  查询某个学生的缺课情况;  统计某段时间内,旷课学生姓名及旷课次数,按旷课次数由多到少...
  • 学生考勤管理系统设计与实现,包含数据库,Java代码,文档以及PPT。本项目就是从实际的理论以及实践基础的角度着眼,阐释了设计并实现了一个基于面向对象结构的考勤系统,项目主要是针对当前阶段我国高效考勤存在...
  • 学生考勤管理系统总共分为班级信息管理、请假条管理、学生信息管理、考勤信息管理等,结合java程序设计语言、jsp动态网页技术、mysql数据库去开发实现的。 1.系统登录:系统登录是用户访问系统的路口,设计

    考勤作为一个学校的基础管理,是对学生的个人出勤情况的依据。传统的考勤靠手工操作、纸质传递,这样的方式造成了考勤不全面、数据不准确和资料的共享程度低。因此学校需要一个可以适应大量信息控制和数据处理的考勤管理系统,用计算机的高效处理方法和数据库的严谨结构代替手工操作和纸质传递,提高考勤的工作效率和节省时间.
    学生考勤管理系统总共分为班级信息管理、请假条管理、学生信息管理、考勤信息管理等,结合java程序设计语言、jsp动态网页技术、mysql数据库去开发实现的。
    1.系统登录:系统登录是用户访问系统的路口,设计了系统登录界面,包括用户名、密码和验证码,然后对登录进来的用户判断身份信息,判断是管理员用户还是普通用户。
    2.普通用户管理:管理员可以管理系统的其他普通用户的账号,包括录入新用户,删除现有的普通用户,修改现有的普通用户的信息,并可以通过用户名和姓名等关键字搜索普通用户,打印用户列表页面,导出用户列表至excel中。
    3.修改密码:系统所有用户(管理员和普通用户)应该都要能修改自己的登录密码,修改后需要重新登录。
    4.个人资料管理:由普通用户使用,普通用户登录系统后,可以修改个人原始信息,如修改电话号码、邮箱等,用户的用户名是无法修改的。
    5.学生信息管理:管理员发布学生信息后,普通用户便可以查询到该学生信息,用户选择某个学生信息,查询学生信息,管理员审核添加,或删除学生信息。
    6.请假条管理:管理员发布请假条后,普通用户便可以查询到该请假条,用户选择某个请假条,查询请假条,管理员审核添加,或删除请假条。
    7.考勤信息管理:管理员发布考勤信息后,普通用户便可以查询到该考勤信息,用户选择某个考勤信息,查询考勤信息,管理员审核添加,或删除考勤信息。
    8.班级信息管理:管理员发布班级信息后,普通用户便可以查询到该班级信息,用户选择某个班级信息,查询班级信息,管理员审核添加,或删除班级信息。
    9.辅导员信息管理:管理员发布辅导员信息后,普通用户便可以查询到该辅导员信息,用户选择某个辅导员信息,查询辅导员信息,管理员审核添加,或删除辅导员信息。
    10.课程安排管理:管理员发布课程安排后,普通用户便可以查询到该课程安排,用户选择某个课程安排,查询课程安排,管理员审核添加,或删除课程安排。在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    第1章 绪论 1
    1.1开发背景 1
    1.2开发意义 1
    1.3研究内容 1
    1.4论文结构 2
    1.5本章小结 2
    第2章 系统开发技术的介绍 3
    2.1 MyEclipse与tomcat简介 3
    2.2HTML/CSS简介 3
    2.3JSP简介 3
    2.4MySQL数据库概念和特点 4
    2.5本章小结 4
    第3章 系统分析 5
    3.1功能需求分析 5
    3.2业务流程分析 7
    3.3数据流程分析 8
    3.4本章小结 12
    第4章 系统设计 13
    4.1系统设计思想 13
    4.2系统总体设计 13
    4.3系统功能模块设计 14
    4.4数据库设计 15
    4.4.1概念模型设计 15
    4.4.2数据库表设计 16
    4.4.3数据库连接计 22
    4.5本章小结 23
    第5章 系统的实现 24
    5.1实现环境说明 24
    5.2主页面的实现 24
    5.3登录模块的实现 25
    5.4留言管理模块的实现 27
    5.5班级信息管理模块的实现 28
    5.6学生信息管理模块的实现 30
    5.7请假条管理模块的实现 32
    5.8考勤信息管理模块的实现 34
    5.9分页算法的实现 36
    5.10本章小结 38
    第6章 系统测试 39
    6.1测试目的 39
    6.2界面测试 39
    6.3功能测试 39
    6.4测试结果 42
    6.5本章小结 42
    第7章 总结 43
    致 谢 44
    参考文献 45

    展开全文
  • 3.2.6系统管理员用户需求描述 6 3.3功能需求描述 7 3.4系统开发工具 7 3.5相关开发工具简介 7 3.5.1 B/S(浏览器/服务器)简介 7 3.5.2 JAVA/JSP简介 8 3.6 系统功能划分 8 3.7 数据字典 9 3.8 数据流图 11 3.9运行...
  • 结合网络信息时代“数字化”校园建设这一思想,根据华北电力大学学生管理的特点,现设计了基于指纹识别技术的学生考勤管理系统。该系统是集课堂考勤、图书馆登到、实验室登到、学生宿舍登到等功能于一体的学生考勤...
  • 高校学生考勤管理系统设计与简单实现-附件资源
  • JSP+SQL学生考勤管理系统(毕业设计)假系统模块、考勤系统模块、后台管理模块。 系统总体上由三大功能模块:请假系统模块、考勤系统模块、后台管理模块组成。系统涉及到高校三大类用户:学生、任课老师、系统管理员 ...
  • 学生考勤管理系统设计与实现

    热门讨论 2011-05-29 10:17:39
    本课程设计的主要目标是实现一个学生考勤管理系统。该系统主要由上下课时间设置管理、上课出勤情况记录管理、考勤统计管理三个模块组成,满足对学生的考勤情况的需求。本系统的开发平台为Windows XP操作系统、程序...
  • 学生考勤管理系统

    2018-03-20 21:15:16
    基于UML的学生考勤管理系统初稿,用于毕业论文设计,用例已分类。
  • C++课程设计 学生考勤管理系统 录入学生的缺课记录; 修改某个学生的缺课记录; 查询某个学生的缺课情况; 统计某段时间内,旷课学生姓名及旷课次数,按旷课次数由多到少排序; 统计某段时间内,有学生旷课的...
  • 学生考勤管理系统概要设计 项目名称学生考勤管理系统概要设计 单位: 广东理工学院 班级: 软件技术2班 学号: 1211302102041 姓名 谢杰希 1引言 1.1编写目的 作为用户与该系统软件开发维护人员共同遵守的软件需求规范...
  • C++课程设计学生考勤管理系统,英文的
  • jsp高校学生考勤管理系统设计与实现(源代码+论文),
  • 学 院 数据结构 课程设计任务书 课程设计题目 考勤管理程序的设计与实现 系 别 数学与计算机科学系 班级信管 1 学生姓名 学号 指导教师 职称 讲师 课程设计进行地点 任 务 下 达 时 间 20 11 年12 月19日 起止日期 ...
  • 高校学生考勤管理系统设计与简单实现

    千次阅读 多人点赞 2019-06-30 17:16:27
    本系统主要针对目前高校学生在线...本高校学生考勤管理系统用JSP+MySQL开发,开发过程中运用了页面模块化、信息发布的动态生成、静态页面显示等技术开发。本论文重点介绍本系统的请假系统、考勤系统两大功能模块设计

    高校学生考勤管理系统设计与简单实现

    我进行这次设计的初衷是想把这个系统放到易班上,所以正常的情况下是应该是两个端口访问的,但是这里我就只用一个index链过去了吗,方便测试。

    index.jsp

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <title>学生请假管理系统</title>
      </head>
      <body>
        <a href="student.jsp">学生端</a><br>
        <a href="teacher.jsp">教师端</a>
      </body>
    </html>
    

    mysql:这里使用的mysql管理工具是 Navicat Premium 12百度网盘链接:https://pan.baidu.com/s/1MMmK_o5LiviNQkxGnG4R4g 提取码:dmdi 强烈推荐,非常好用。
    在这里插入图片描述
    student.jsp

    <%@ page contentType="text/html;charset=gb2312" %>
    <%@ page language="java" import=" java.util.Date"%>
    <%@ page language="java" import=" java.text.SimpleDateFormat"%>
    <HTML><body bgcolor=#33ccff>
    <%
    	Date date=new Date();
    	SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 
    	System.out.println(sdf.format(date)); 
    	String qingjia_time =(String)sdf.format(date);
    %>
    <center>
    <font size=2>
    <form action="insert_Servlet?dataBase=student&tableName=qingjia&qingjia_time=<%=qingjia_time%>" method=post>
    <h3>请假</h3>
    <table border=1>
    <tr><td>学号:		 </td><td><Input type="text" name="stu_number"></td></tr>
    <tr><td>班级:		 </td><td><Input type="text" name="class_id"></td></tr>
    <tr><td>姓名:		 </td><td><Input type="text" name="stu_name"></td></tr>
    <tr><td>请假开始时间:</td><td><Input type="text" name="start_time"></td></tr>
    <tr><td>请假结束时间:</td><td><Input type="text" name="end_time"></td></tr>
    <tr><td>请假原因:	 </td><td><Input type="text" name="qingjia_yuanyin"></td></tr>
    </table>
    <br><input type="submit" name="b" value="提交">
    </font>
    
    </center>
    </body></HTML>
    
    

    teacher.jsp
    在这里插入图片描述

    <%@ page contentType="text/html;charset=GB2312" %>
    <HTML>
    <BODY>
    <Font size=4>
    <FORM action="Select_class_Servlet?dataBase=student&tableName=qingjia" Method="post">
     <P>班级查询
     <P>输入班级:
      <Input type=text name="class_id">
      <Input type=submit name="a" value="提交">
    </Form>
    <FORM action="Select_number_Servlet?dataBase=student&tableName=qingjia" Method="post">
     <P>学号查询
     <P>输入学号:
      <Input type=text name="stu_number">
      <Input type=submit name="b" value="提交">
    </Form>
    </BODY></HTML>
    
    

    showRecord.jsp
    在这里插入图片描述

    <%@ page contentType="text/html;charset=gb2312" %>
    <jsp:useBean id="resultBean" class="mybean.data.studentinfo" scope="request"/>
    <HTML><body bgcolor=#DEEFF9>
    
    <font size=2>
      <table border=1>
      <%  String []columnName=resultBean.getColumnName(); 
      %>
      <tr>
    	  <th>编号</th>
    	  <th>学生学号</th>
    	  <th>班级</th>
    	  <th>姓名</th>
    	  <th>开始时间</th>
    	  <th>结束时间</th>
    	  <th>申请请假时间</th>
    	  <th>请假原因</th>
    	  <th>辅导员审批状态</th>
    	  <th>辅导员审批时间</th>
    	  <th>辅导员回复</th>
      </tr>
      <%  String [][] record = resultBean.getTableRecord();
          for(int i=0;i<record.length;i++) {
      %>    <tr>
      <%     for(int j=0;j<record[i].length;j++) {
      %>        <td><%= record[i][j] %> </td>
      <%     }
      %>    </tr>
      <%  }
      %>
      </table>
    <center>
    <font size=2>
    <form action="delete_Servlet?dataBase=student&tableName=qingjia" method=post>
    <h3>输入ID删除请假记录</h3>
    <table border=1>
    <tr><td>ID:</td><td><Input type="text" name="ID"></td></tr>
    <tr><td>学号:</td><td><Input type="text" name="stu_number"></td></tr>
    </table>
    <br><input type="submit" name="b" value="提交">
    </font>
    </center>
    </font></body></HTML>  
    
    

    showRecord_teacher.jsp
    在这里插入图片描述

    <%@ page contentType="text/html;charset=gb2312" %>
    <%@ page language="java" import=" java.util.Date"%>
    <%@ page language="java" import=" java.text.SimpleDateFormat"%>
    <jsp:useBean id="resultBean" class="mybean.data.studentinfo" scope="request"/>
    <HTML><body bgcolor=#DEEFF9>
    
    <font size=2>
      <table border=1>
      <%
    	Date date=new Date();
    	SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 
    	System.out.println(sdf.format(date)); 
    	String class_teacher_sp_time =(String)sdf.format(date);
    	%>
      <%  String []columnName=resultBean.getColumnName(); 
      %>
     <tr>
    	  <th>编号</th>
    	  <th>学生学号</th>
    	  <th>班级</th>
    	  <th>姓名</th>
    	  <th>开始时间</th>
    	  <th>结束时间</th>
    	  <th>申请请假时间</th>
    	  <th>请假原因</th>
    	  <th>辅导员审批状态</th>
    	  <th>辅导员审批时间</th>
    	  <th>辅导员回复</th>
      </tr>
      <%  String [][] record = resultBean.getTableRecord();
          for(int i=0;i<record.length;i++) {
      %>    <tr>
      <%     for(int j=0;j<record[i].length;j++) {
      %>        <td><%= record[i][j] %> </td>
      <%     }
      %>    </tr>
      <%  }
      %>
      </table>
    <center>
    <font size=2>
    <form action="insert_Sp_Servlet?dataBase=student&tableName=qingjia&class_teacher_sp_time=<%=class_teacher_sp_time%>" method=post>
    <h3>输入ID进行审批</h3>
    <table border=1>
    <tr><td>ID:</td><td><Input type="text" name="ID"></td></tr>
    <tr><td>辅导员审批状态:</td><td><Input type="text" name="class_teacher_status"></td></tr>
    <tr><td>辅导员回复:</td><td><Input type="text" name="class_teacher_restore"></td></tr>
    <tr>注:0为等待审批,1为同意请假,2为不同意请假</tr>
    </table>
    <br><input type="submit" name="b" value="提交">
    </font>
    </center>
    </font></body></HTML>  
    
    

    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 
    	xmlns="http://java.sun.com/xml/ns/javaee" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
      <display-name></display-name>
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>Insert_Servlet</servlet-name>
        <servlet-class>myservlet.control.Insert_Servlet</servlet-class>
      </servlet>
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>Delete_Servlet</servlet-name>
        <servlet-class>myservlet.control.Delete_Servlet</servlet-class>
      </servlet>
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>Select_class_Servlet</servlet-name>
        <servlet-class>myservlet.control.Select_class_Servlet</servlet-class>
      </servlet>
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>Select_number_Servlet</servlet-name>
        <servlet-class>myservlet.control.Select_number_Servlet</servlet-class>
      </servlet>
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>Insert_Sp_Servlet</servlet-name>
        <servlet-class>myservlet.control.Insert_Sp_Servlet</servlet-class>
      </servlet>
    
    
    
    
    
      <servlet-mapping>
        <servlet-name>Insert_Servlet</servlet-name>
        <url-pattern>/insert_Servlet</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Delete_Servlet</servlet-name>
        <url-pattern>/delete_Servlet</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Select_class_Servlet</servlet-name>
        <url-pattern>/Select_class_Servlet</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Select_number_Servlet</servlet-name>
        <url-pattern>/Select_number_Servlet</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Insert_Sp_Servlet</servlet-name>
        <url-pattern>/insert_Sp_Servlet</url-pattern>
      </servlet-mapping>	
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>
    
    

    studentinfo.java

    package mybean.data;
    
    public class studentinfo {
    		String []columnName ;           //存放列名
    	   String [][] tableRecord=null;   //存放查询到的记录
    	   public studentinfo() {
    	      tableRecord = new String[1][1];
    	      columnName = new String[1]; 
    	   }
    	   public void setTableRecord(String [][] s){
    	      tableRecord=s;
    	   }
    	   public String [][] getTableRecord(){
    	      return tableRecord;
    	   }
    	   public void setColumnName(String [] s) {
    	      columnName = s;
    	   }
    	   public String [] getColumnName() {
    	      return columnName;
    	   }
    }
    
    

    Delete_Servlet.java

    package myservlet.control;
    import mybean.data.studentinfo; 
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Delete_Servlet extends HttpServlet{
       public void init(ServletConfig config) throws ServletException{
          super.init(config);
       }
       public void doPost(HttpServletRequest request,HttpServletResponse response)
                   throws ServletException,IOException{
    	   studentinfo resultBean=null;
          try{  resultBean=(studentinfo)request.getAttribute("resultBean");
                if(resultBean==null){
                    resultBean=new studentinfo(); //创建Javabean对象
                    request.setAttribute("resultBean",resultBean);
                }
          }
          catch(Exception exp){
                resultBean=new studentinfo();  //创建Javabean对象
                request.setAttribute("resultBean",resultBean);
          } 
         try{  Class.forName("com.mysql.jdbc.Driver");//加载驱动
         }
         catch(Exception e){} 
         request.setCharacterEncoding("gb2312");
         String dataBase  = request.getParameter("dataBase");
         String tableName = request.getParameter("tableName");
         
         String stu_number=request.getParameter("stu_number");
         String id=request.getParameter("ID");
         String stu_name=request.getParameter("stu_name");
         String start_time=request.getParameter("start_time");
         String end_time=request.getParameter("end_time");
         String qingjia_time=request.getParameter("qingjia_time");
         String qingjia_yuanyin=request.getParameter("qingjia_yuanyin");
         
         
        
         
         if(id==null||id.length()==0) {
            fail(request,response,"添加记录失败,必须给出记录");
            return;
         }
         String condition = "DELETE FROM "+tableName+" where id='"+id+"'";
         System.out.println(condition);
         Connection con;
         Statement sql; 
         ResultSet rs;
         try{ 
        	 
        	 String uri= "jdbc:mysql://localhost/"+dataBase+"?characterEncoding=utf8";
        		
           	 con=DriverManager.getConnection(uri,"root","root1");//建立连接
           
       	
              sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_READ_ONLY);
              sql.executeUpdate(condition);
              
             // System.out.println("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
              
              rs=sql.executeQuery("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
     
              ResultSetMetaData metaData = rs.getMetaData();
              int columnCount = metaData.getColumnCount(); //得到结果集的列数
              String []columnName = new String[columnCount];
              for(int i=0;i<columnName.length;i++) {
                 columnName[i] = metaData.getColumnName(i+1); //得到列名
              }
              resultBean.setColumnName(columnName);   //更新Javabean数据模型
              rs.last();
              int rowNumber=rs.getRow();  //得到记录数
              String [][] tableRecord=resultBean.getTableRecord();
              tableRecord = new String[rowNumber][columnCount];
              rs.beforeFirst();
              int i=0;
              while(rs.next()){
                for(int k=0;k<columnCount;k++) 
                  tableRecord[i][k] = rs.getString(k+1);
                i++; 
              }
              resultBean.setTableRecord(tableRecord); //更新Javabean数据模型
              con.close();
              RequestDispatcher dispatcher=
              request.getRequestDispatcher("showRecord.jsp");
              dispatcher.forward(request,response);
         }
         catch(SQLException e){
              System.out.println(e);
              fail(request,response,"添加记录失败:"+e.toString());
         }  
       }
       public  void  doGet(HttpServletRequest request,HttpServletResponse response)
               throws ServletException,IOException{
           doPost(request,response);
       }
       public void fail(HttpServletRequest request,HttpServletResponse response,
                          String backNews) {
            response.setContentType("text/html;charset=GB2312");
            try {
             PrintWriter out=response.getWriter();
             out.println("<html><body>");
             out.println("<h2>"+backNews+"</h2>") ;
             out.println("返回");
             out.println("<a href=student.jsp>输入记录</a>");
             out.println("</body></html>");
            }
            catch(IOException exp){} 
        }
    }
    
    

    Insert_Servlet.java

    package myservlet.control;
    import mybean.data.studentinfo; 
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Insert_Servlet extends HttpServlet{
       public void init(ServletConfig config) throws ServletException{
          super.init(config);
       }
       public void doPost(HttpServletRequest request,HttpServletResponse response)
                   throws ServletException,IOException{
    	   studentinfo resultBean=null;
          try{  resultBean=(studentinfo)request.getAttribute("resultBean");
                if(resultBean==null){
                    resultBean=new studentinfo(); //创建Javabean对象
                    request.setAttribute("resultBean",resultBean);
                }
          }
          catch(Exception exp){
                resultBean=new studentinfo();  //创建Javabean对象
                request.setAttribute("resultBean",resultBean);
          } 
         try{  Class.forName("com.mysql.jdbc.Driver");//加载驱动
         }
         catch(Exception e){} 
         request.setCharacterEncoding("gb2312");
         String dataBase  = request.getParameter("dataBase");
         String tableName = request.getParameter("tableName");
         
         String stu_number=request.getParameter("stu_number");
         String class_id=request.getParameter("class_id");
         String stu_name=request.getParameter("stu_name");
         String start_time=request.getParameter("start_time");
         String end_time=request.getParameter("end_time");
         String qingjia_time=request.getParameter("qingjia_time");
         String qingjia_yuanyin=request.getParameter("qingjia_yuanyin");
         
         
        
         
         if(stu_number==null||stu_number.length()==0) {
            fail(request,response,"添加记录失败,必须给出记录");
            return;
         }
         String condition = "INSERT INTO "+tableName+"(stu_number,class_id,stu_name,start_time,end_time,qingjia_time,qingjia_yuanyin) VALUES"+
          "('"+stu_number+"','"+class_id+"','"+stu_name+"','"+start_time+"','"+end_time+"','"+qingjia_time+"','"+qingjia_yuanyin+"')";
         //System.out.println(condition);
         Connection con;
         Statement sql; 
         ResultSet rs;
         try{ 
        	 
        	 String uri= "jdbc:mysql://localhost/"+dataBase+"?characterEncoding=utf8";
        		
           	 con=DriverManager.getConnection(uri,"root","root1");//建立连接
           
       	
              sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_READ_ONLY);
              sql.executeUpdate(condition);
              
              System.out.println("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
              
              rs=sql.executeQuery("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
     
              ResultSetMetaData metaData = rs.getMetaData();
              int columnCount = metaData.getColumnCount(); //得到结果集的列数
              String []columnName = new String[columnCount];
              for(int i=0;i<columnName.length;i++) {
                 columnName[i] = metaData.getColumnName(i+1); //得到列名
              }
              resultBean.setColumnName(columnName);   //更新Javabean数据模型
              rs.last();
              int rowNumber=rs.getRow();  //得到记录数
              String [][] tableRecord=resultBean.getTableRecord();
              tableRecord = new String[rowNumber][columnCount];
              rs.beforeFirst();
              int i=0;
              while(rs.next()){
                for(int k=0;k<columnCount;k++) 
                  tableRecord[i][k] = rs.getString(k+1);
                i++; 
              }
              resultBean.setTableRecord(tableRecord); //更新Javabean数据模型
              con.close();
              RequestDispatcher dispatcher=
              request.getRequestDispatcher("showRecord.jsp");
              dispatcher.forward(request,response);
         }
         catch(SQLException e){
              System.out.println(e);
              fail(request,response,"添加记录失败:"+e.toString());
         }  
       }
       public  void  doGet(HttpServletRequest request,HttpServletResponse response)
               throws ServletException,IOException{
           doPost(request,response);
       }
       public void fail(HttpServletRequest request,HttpServletResponse response,
                          String backNews) {
            response.setContentType("text/html;charset=GB2312");
            try {
             PrintWriter out=response.getWriter();
             out.println("<html><body>");
             out.println("<h2>"+backNews+"</h2>") ;
             out.println("返回");
             out.println("<a href=student.jsp>输入记录</a>");
             out.println("</body></html>");
            }
            catch(IOException exp){} 
        }
    }
    
    

    Insert_Sp_Servlet.java

    package myservlet.control;
    import mybean.data.studentinfo; 
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Insert_Sp_Servlet extends HttpServlet{
       public void init(ServletConfig config) throws ServletException{
          super.init(config);
       }
       public void doPost(HttpServletRequest request,HttpServletResponse response)
                   throws ServletException,IOException{
    	   studentinfo resultBean=null;
          try{  resultBean=(studentinfo)request.getAttribute("resultBean");
                if(resultBean==null){
                    resultBean=new studentinfo(); //创建Javabean对象
                    request.setAttribute("resultBean",resultBean);
                }
          }
          catch(Exception exp){
                resultBean=new studentinfo();  //创建Javabean对象
                request.setAttribute("resultBean",resultBean);
          } 
         try{  Class.forName("com.mysql.jdbc.Driver");//加载驱动
         }
         catch(Exception e){} 
         request.setCharacterEncoding("gb2312");
         String dataBase  = request.getParameter("dataBase");
         String tableName = request.getParameter("tableName");
         
         String id=request.getParameter("ID");
         String class_teacher_status=request.getParameter("class_teacher_status");
         String class_teacher_sp_time=request.getParameter("class_teacher_sp_time");
         String class_teacher_restore=request.getParameter("class_teacher_restore");
         
         if(class_teacher_sp_time==null||class_teacher_sp_time.length()==0) {
            fail(request,response,"添加记录失败,必须给出记录");
            return;
         }
         
         String condition = "UPDATE "+tableName+" SET class_teacher_status='"+class_teacher_status+"' , class_teacher_sp_time='"+class_teacher_sp_time+"' ,class_teacher_restore='"+class_teacher_restore+"'"+" where id='"+id+"'";
         System.out.println(condition);
         Connection con;
         Statement sql; 
         ResultSet rs;
         try{ 
        	 
        	 String uri= "jdbc:mysql://localhost/"+dataBase+"?characterEncoding=utf8";
        		
           	 con=DriverManager.getConnection(uri,"root","root1");//建立连接
           
       	
              sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_READ_ONLY);
              sql.executeUpdate(condition);
              
              System.out.println("SELECT * FROM "+tableName+" where id='"+id+"'");
              
              rs=sql.executeQuery("SELECT * FROM "+tableName+" where id='"+id+"'");
     
              ResultSetMetaData metaData = rs.getMetaData();
              int columnCount = metaData.getColumnCount(); //得到结果集的列数
              String []columnName = new String[columnCount];
              for(int i=0;i<columnName.length;i++) {
                 columnName[i] = metaData.getColumnName(i+1); //得到列名
              }
              resultBean.setColumnName(columnName);   //更新Javabean数据模型
              rs.last();
              int rowNumber=rs.getRow();  //得到记录数
              String [][] tableRecord=resultBean.getTableRecord();
              tableRecord = new String[rowNumber][columnCount];
              rs.beforeFirst();
              int i=0;
              while(rs.next()){
                for(int k=0;k<columnCount;k++) 
                  tableRecord[i][k] = rs.getString(k+1);
                i++; 
              }
              resultBean.setTableRecord(tableRecord); //更新Javabean数据模型
              con.close();
              RequestDispatcher dispatcher=
              request.getRequestDispatcher("showRecord.jsp");
              dispatcher.forward(request,response);
         }
         catch(SQLException e){
              System.out.println(e);
              fail(request,response,"添加记录失败:"+e.toString());
         }  
       }
       public  void  doGet(HttpServletRequest request,HttpServletResponse response)
               throws ServletException,IOException{
           doPost(request,response);
       }
       public void fail(HttpServletRequest request,HttpServletResponse response,
                          String backNews) {
            response.setContentType("text/html;charset=GB2312");
            try {
             PrintWriter out=response.getWriter();
             out.println("<html><body>");
             out.println("<h2>"+backNews+"</h2>") ;
             out.println("返回");
             out.println("<a href=student.jsp>输入记录</a>");
             out.println("</body></html>");
            }
            catch(IOException exp){} 
        }
    }
    
    

    Select_class_Servlet.java

    package myservlet.control;
    import mybean.data.studentinfo; 
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Select_class_Servlet extends HttpServlet{
       public void init(ServletConfig config) throws ServletException{
          super.init(config);
       }
       public void doPost(HttpServletRequest request,HttpServletResponse response)
                   throws ServletException,IOException{
    	   studentinfo resultBean=null;
          try{  resultBean=(studentinfo)request.getAttribute("resultBean");
                if(resultBean==null){
                    resultBean=new studentinfo(); //创建Javabean对象
                    request.setAttribute("resultBean",resultBean);
                }
          }
          catch(Exception exp){
                resultBean=new studentinfo();  //创建Javabean对象
                request.setAttribute("resultBean",resultBean);
          } 
         try{  Class.forName("com.mysql.jdbc.Driver");//加载驱动
         }
         catch(Exception e){} 
         request.setCharacterEncoding("gb2312");
         String dataBase  = request.getParameter("dataBase");
         String tableName = request.getParameter("tableName");
         
         String class_id=request.getParameter("class_id");
      
         if( class_id==null||class_id.length()==0) {
            fail(request,response,"添加记录失败,必须给出记录");
            return;
         }
         Connection con;
         Statement sql; 
         ResultSet rs;
         try{ 
        	 
        	 String uri= "jdbc:mysql://localhost/"+dataBase+"?characterEncoding=utf8";
        		
           	 con=DriverManager.getConnection(uri,"root","root1");//建立连接
           
       	
              sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_READ_ONLY);         
             // System.out.println("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
              
              rs=sql.executeQuery("SELECT * FROM "+tableName+" where class_id='"+ class_id+"'");
     
              ResultSetMetaData metaData = rs.getMetaData();
              int columnCount = metaData.getColumnCount(); //得到结果集的列数
              String []columnName = new String[columnCount];
              for(int i=0;i<columnName.length;i++) {
                 columnName[i] = metaData.getColumnName(i+1); //得到列名
              }
              resultBean.setColumnName(columnName);   //更新Javabean数据模型
              rs.last();
              int rowNumber=rs.getRow();  //得到记录数
              String [][] tableRecord=resultBean.getTableRecord();
              tableRecord = new String[rowNumber][columnCount];
              rs.beforeFirst();
              int i=0;
              while(rs.next()){
                for(int k=0;k<columnCount;k++) 
                  tableRecord[i][k] = rs.getString(k+1);
                i++; 
              }
              resultBean.setTableRecord(tableRecord); //更新Javabean数据模型
              con.close();
              RequestDispatcher dispatcher=
              request.getRequestDispatcher("showRecord_teacher.jsp");
              dispatcher.forward(request,response);
         }
         catch(SQLException e){
              System.out.println(e);
              fail(request,response,"添加记录失败:"+e.toString());
         }  
       }
       public  void  doGet(HttpServletRequest request,HttpServletResponse response)
               throws ServletException,IOException{
           doPost(request,response);
       }
       public void fail(HttpServletRequest request,HttpServletResponse response,
                          String backNews) {
            response.setContentType("text/html;charset=GB2312");
            try {
             PrintWriter out=response.getWriter();
             out.println("<html><body>");
             out.println("<h2>"+backNews+"</h2>") ;
             out.println("返回");
             out.println("<a href=showRecord_teacher.jsp>输入记录</a>");
             out.println("</body></html>");
            }
            catch(IOException exp){} 
        }
    }
    
    

    Select_number_Servlet.java

    package myservlet.control;
    import mybean.data.studentinfo; 
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Select_number_Servlet extends HttpServlet{
       public void init(ServletConfig config) throws ServletException{
          super.init(config);
       }
       public void doPost(HttpServletRequest request,HttpServletResponse response)
                   throws ServletException,IOException{
    	   studentinfo resultBean=null;
          try{  resultBean=(studentinfo)request.getAttribute("resultBean");
                if(resultBean==null){
                    resultBean=new studentinfo(); //创建Javabean对象
                    request.setAttribute("resultBean",resultBean);
                }
          }
          catch(Exception exp){
                resultBean=new studentinfo();  //创建Javabean对象
                request.setAttribute("resultBean",resultBean);
          } 
         try{  Class.forName("com.mysql.jdbc.Driver");//加载驱动
         }
         catch(Exception e){} 
         request.setCharacterEncoding("gb2312");
         String dataBase  = request.getParameter("dataBase");
         String tableName = request.getParameter("tableName");
         
         String stu_number=request.getParameter("stu_number");
      
         if( stu_number==null||stu_number.length()==0) {
            fail(request,response,"添加记录失败,必须给出记录");
            return;
         }
         Connection con;
         Statement sql; 
         ResultSet rs;
         try{ 
        	 
        	 String uri= "jdbc:mysql://localhost/"+dataBase+"?characterEncoding=utf8";
        		
           	 con=DriverManager.getConnection(uri,"root","root1");//建立连接
           
       	
              sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_READ_ONLY);         
             // System.out.println("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
              
              rs=sql.executeQuery("SELECT * FROM "+tableName+" where stu_number='"+stu_number+"'");
     
              ResultSetMetaData metaData = rs.getMetaData();
              int columnCount = metaData.getColumnCount(); //得到结果集的列数
              String []columnName = new String[columnCount];
              for(int i=0;i<columnName.length;i++) {
                 columnName[i] = metaData.getColumnName(i+1); //得到列名
              }
              resultBean.setColumnName(columnName);   //更新Javabean数据模型
              rs.last();
              int rowNumber=rs.getRow();  //得到记录数
              String [][] tableRecord=resultBean.getTableRecord();
              tableRecord = new String[rowNumber][columnCount];
              rs.beforeFirst();
              int i=0;
              while(rs.next()){
                for(int k=0;k<columnCount;k++) 
                  tableRecord[i][k] = rs.getString(k+1);
                i++; 
              }
              resultBean.setTableRecord(tableRecord); //更新Javabean数据模型
              con.close();
              RequestDispatcher dispatcher=
              request.getRequestDispatcher("showRecord_teacher.jsp");
              dispatcher.forward(request,response);
         }
         catch(SQLException e){
              System.out.println(e);
              fail(request,response,"添加记录失败:"+e.toString());
         }  
       }
       public  void  doGet(HttpServletRequest request,HttpServletResponse response)
               throws ServletException,IOException{
           doPost(request,response);
       }
       public void fail(HttpServletRequest request,HttpServletResponse response,
                          String backNews) {
            response.setContentType("text/html;charset=GB2312");
            try {
             PrintWriter out=response.getWriter();
             out.println("<html><body>");
             out.println("<h2>"+backNews+"</h2>") ;
             out.println("返回");
             out.println("<a href=showRecord_teacher.jsp>输入记录</a>");
             out.println("</body></html>");
            }
            catch(IOException exp){} 
        }
    }
    
    

    值得注意的是,jdbc要用5.0的

    展开全文
  • 学生考勤管理系统,是毕业设计时的论文。讲述了学生考勤管理系统中的相应内容。以及毕业设计的格式等
  • c语言课程设计学生考勤管理系统.doc

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,140
精华内容 856
关键字:

学生考勤管理系统设计报告