学生档案信息管理系统(Java实现) 您所在的位置:网站首页 毕业生档案管理系统 学生档案信息管理系统(Java实现)

学生档案信息管理系统(Java实现)

2024-06-07 14:59| 来源: 网络整理| 查看: 265

一、整体设计

        该系统基于Java图形界面以及MySQL数据库实现,其中MySQL数据库操作实现了增查改删。用户可在登录界面进入学生信息填写系统、教师管理系统、管理员管理系统,还可进行注册学生、教师登录账号信息、修改密码等操作。其中在管理员管理系统中含有JTable表格实时显示账户信息。下面为实现该系统的层次图。

二、MySQL数据库

        经过需求分析得MySQL数据库系统中有三个实体:账号信息(学生学号、学生姓名、密码);学生信息(学生姓名、性别、学生学号。班级、班主任、出生日期、民族、政治面貌、身份证号、家庭电话、个人电话、家庭住址);教师信息(教师姓名、教职工号、联系方式);

        实体与实体之间还存在两个联系:账号与学生之间的注册关系(一个学生只能注册一个账号,一个账号只能被一个学生注册);学生与教师之间的管理关系(多个学生可以被多个教师管理,多个教师也可以管理多个学生),具体实现E-R图如下。

三、界面具体设计

3.1 用户登录界面

        学生注册账号、账号登录;教师注册账号、账号登录;管理员登录。通过下次菜单进行选择。选择后某些文本编辑框会设置不可填状态。此外学生可进行修改密码操作。界面效果图如下。

  部分实现代码。

@Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub String pass = ""; String s_account = ""; if (e.getSource() == button) { s_account = textField_1.getText(); pass = passField.getText(); user = comboBox.getSelectedItem().toString(); String r = ""; String idss=""; ResigerDaoImpl rdi = new ResigerDaoImpl(); Resiger ri = rdi.selectpwd2(s_account); r = ri.getPass(); String idcards=textField_2.getText(); Manage_InfDaoImpl midi=new Manage_InfDaoImpl(); List listtea=midi.getTeacherName(idcards); Iterator it=listtea.iterator(); while(it.hasNext()){ Teacher_Inf s=it.next(); idss=s.getIdcard(); } if (pass.equals(r) && user.equals("学生")) { // 跳转至学生填写信息界面并提示欢迎使用此系统 frame.setVisible(false); WriteStudent ts = new WriteStudent(); ts.frame.setVisible(true); JOptionPane.showMessageDialog(frame, "欢迎,请正确填写个人信息"); }else if (user.equals("普通教师") && password.equals("classdesgin666")) { // 跳转至另一个界面并提示欢迎进入此系统 if(idss.equals("")){ JOptionPane.showMessageDialog(frame, "您输入的教职工号不存在,请联系管理人员"); }else{ frame.setVisible(false); TeacherFrame tf=new TeacherFrame(); tf.frame.setVisible(true); JOptionPane.showMessageDialog(frame, "欢迎进入学生档案系统"); } }else if (pass.equals("888") && user.equals("系统管理员")) { // 跳转至另一个界面并提示欢迎进入此系统 frame.setVisible(false); ManageFrame tm = new ManageFrame(); tm.frame.setVisible(true); JOptionPane.showMessageDialog(frame, "欢迎进入管理系统"); } else { JOptionPane.showMessageDialog(frame, "密码错误或账号,请重新输入"); passField.setText(""); textField_2.setText(""); } } else if (e.getSource() == button_1) { passField.setText(""); textField_1.setText(""); textField_2.setText(""); comboBox.removeAllItems(); comboBox.addItem("学生"); comboBox.addItem("普通教师"); comboBox.addItem("系统管理员"); } else if (e.getSource() == button_2) { frame.setVisible(false); StudentResiger sr = new StudentResiger(); sr.frame.setVisible(true); } else if (e.getSource() == button_3) { frame.setVisible(false); ChangeResiger cr = new ChangeResiger(); cr.frame.setVisible(true); } }

3.2 学生修改密码界面

        该界面实现了学生输入学号后判断是否存在、学号与密码是否匹配、原密码与新密码是否不一致等。界面效果图如下。

3.3 学生填写个人信息界面

        学生填写个人信息,点击提交按钮载入MySQL数据库。

  部分实现代码。

JButton btnNewButton = new JButton("\u63D0\u4EA4"); btnNewButton.setFont(new Font("宋体", Font.BOLD, 25)); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Connection conn = DBtools.getconn(); PreparedStatement pstmt = null; String sql = "select *from t_student where student_num=?"; String student_num = textField_3.getText(); JTextField[] jtf= {textField,textField_1,textField_2,textField_3, textField_4,textField_6,textField_9,textField_7,textField_8,textField_10}; int a; for(a = 0; a


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有