学生成绩管理系统

  • W5_285432
    了解作者
  • 2.2MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 05:37
    上传日期
用JAVA+Server2000编写的一个教学管理软件,包括管理员、教师与学生模块,功能比较齐全,且还有论文、数据库备份。只要连接一下就可以运行
学生成绩管理系统.zip
  • 学生成绩管理系统
  • ScoreMis.jpx.local
    8KB
  • ScoreMis.jpx~
    0B
  • ScoreMis.jpx.local~
    1.5KB
  • src
  • scoremis
  • SScoreQuery.java
    2KB
  • InputT_C.java~1~
    6KB
  • StudentQuery.java
    8.1KB
  • drawTu.java
    2.4KB
  • StudentQuery.jbx
    1KB
  • InputTea.java
    4.1KB
  • QueryTea.java~3~
    6.1KB
  • helpframe.java
    1.3KB
  • Instu.java
    6.4KB
  • Welcome.java
    1.4KB
  • InputScore.java
    6.2KB
  • login.java
    5.9KB
  • login.jbx
    480B
  • StuUI.java
    1KB
  • QueryTea.java
    6.1KB
  • editSTU.java
    6.8KB
  • editTea.java~2~
    4.8KB
  • QueryScore.java
    5.4KB
  • editTea.java~1~
    4.8KB
  • MainUI.java
    7.7KB
  • EditScore.java
    4.6KB
  • QueryTea.java~2~
    5.8KB
  • InputCourse.java
    4.2KB
  • InputT_C.java
    6.7KB
  • StudentQuery.java~1~
    8KB
  • QueryTea.java~1~
    6KB
  • TeaUI.java
    926B
  • DayManage.java
    6.6KB
  • editTea.java
    4.6KB
  • 实训报告.doc
    1.8MB
  • classes
  • package cache
  • scoremis.dep2
    82.8KB
  • scoremis
  • MainUI$9.class
    1.1KB
  • MainUI$11.class
    1.1KB
  • MainUI$7.class
    797B
  • Instu.class
    5.3KB
  • MainUI$1.class
    961B
  • MainUI$Beifen.class
    2.3KB
  • EditScore.class
    4.1KB
  • InputTea$Handel.class
    2.4KB
  • MainUI$8.class
    791B
  • MainUI$5.class
    827B
  • MainUI$4.class
    785B
  • login.class
    3.2KB
  • Welcome$1.class
    713B
  • editSTU$Handel.class
    4.5KB
  • QueryTea$EventHadel.class
    5KB
  • StudentQuery$1.class
    2.2KB
  • MainUI.class
    4.8KB
  • QueryTea$1.class
    1.2KB
  • QueryTea.class
    3.4KB
  • InputT_C$1.class
    1.4KB
  • StuUI.class
    1.8KB
  • QueryScore$cquery.class
    2.3KB
  • MainUI$10.class
    1.6KB
  • TeaUI.class
    1.3KB
  • EditScore$chaxun.class
    3.6KB
  • helpframe.class
    1.4KB
  • drawTu.class
    3KB
  • login$yanzheng.class
    3.7KB
  • InputT_C$EventHandel.class
    3.7KB
  • MainUI$6.class
    1.3KB
  • InputCourse$EventHandel.class
    2KB
  • StudentQuery$2.class
    863B
  • editSTU$2.class
    1.3KB
  • InputScore$chaxun.class
    3.8KB
  • editSTU$1.class
    1.5KB
  • StuUI_asd_actionAdapter.class
    641B
  • DayManage$Handel.class
    3.4KB
  • QueryScore$chaxun.class
    3.8KB
  • StudentQuery.class
    6.7KB
  • InputScore$cquery.class
    2KB
  • InputT_C.class
    4.8KB
  • InputCourse.class
    3.6KB
  • editTea.class
    3.8KB
  • SScoreQuery.class
    3.2KB
  • DayManage.class
    4KB
  • InputScore.class
    4.1KB
  • helpframe$1.class
    636B
  • QueryScore.class
    4.3KB
  • dbconn.class
    1.5KB
  • editSTU.class
    3.7KB
  • Welcome.class
    1.2KB
  • editTea$Handel.class
    2.2KB
  • InputTea.class
    3.3KB
  • MainUI$3.class
    651B
  • MainUI$2.class
    1.1KB
  • Instu$Handel.class
    3.2KB
  • bak
  • dbconn.java~3~
    864B
  • dbconn.java~2~
    926B
  • dbconn.java~1~
    0B
内容介绍
package scoremis; import java.awt.*; import javax.swing.*; import java.sql.*; import java.awt.event.*; import javax.swing.border.*; import java.util.Date; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2007</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class StudentQuery extends JFrame { String sql = "", sf = ""; public StudentQuery(String xm, String xh, String xb, Date sr, String bj, String sf) { try { sid = xh; sname = xm; ssex = xb; sbrith = sr; sclass = bj; SID.setText(xh); Sname.setText(xm); brith.setText(sbrith.toString()); this.sf = sf; jbInit(); } catch (Exception exception) { exception.printStackTrace(); } } public StudentQuery(String xm, String xh) { try { sid = xh; sname = xm; edit.setEnabled(false); sex.setEnabled(false); sgreade.setEnabled(false); jbInit(); } catch (Exception exception) { exception.printStackTrace(); } } private void jbInit() throws Exception { titledBorder1 = new TitledBorder(""); getContentPane().setLayout(null); jLabel1.setFont(new java.awt.Font("Dialog", 1, 22)); //初始化各组件 jLabel1.setToolTipText(""); photo.setBackground(Color.gray); photo.setFont(new java.awt.Font("Dialog", 0, 12)); photo.setForeground(Color.black); photo.setBorder(titledBorder1); photo.setHorizontalTextPosition(SwingConstants.CENTER); photo.setIcon(null); photo.setText("暂无照片"); brith.setFont(new java.awt.Font("Dialog", 0, 12)); brith.setBounds(new Rectangle(142, 216, 116, 25)); photo.setBounds(new Rectangle(285, 79, 100, 120)); SID.setFont(new java.awt.Font("Dialog", 0, 12)); SID.setBounds(new Rectangle(142, 79, 115, 27)); sgreade.setFont(new java.awt.Font("Dialog", 0, 12)); sgreade.setBounds(new Rectangle(142, 176, 115, 25)); Sname.setFont(new java.awt.Font("Dialog", 0, 12)); Sname.setBounds(new Rectangle(142, 110, 115, 27)); sex.setFont(new java.awt.Font("Dialog", 0, 12)); sex.setBounds(new Rectangle(142, 142, 115, 27)); jLabel1.setBounds(new Rectangle(111, 22, 149, 38)); quit.setBounds(new Rectangle(248, 257, 83, 25)); quit.setFont(new java.awt.Font("Dialog", 0, 12)); edit.setBounds(new Rectangle(93, 257, 83, 25)); edit.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel2.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel2.setText("学 号:"); jLabel2.setBounds(new Rectangle(69, 83, 71, 15)); jLabel3.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel3.setToolTipText(""); jLabel3.setText("姓 名:"); jLabel3.setBounds(new Rectangle(69, 115, 63, 15)); jLabel4.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel4.setToolTipText(""); jLabel4.setText("性 别:"); jLabel4.setBounds(new Rectangle(69, 147, 60, 15)); jLabel6.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel6.setRequestFocusEnabled(true); jLabel6.setText("班 级:"); jLabel6.setBounds(new Rectangle(69, 179, 65, 15)); jLabel5.setFont(new java.awt.Font("Dialog", 0, 12)); sex.addItem("男"); sex.addItem("女");sex.setSelectedItem(ssex); { dbconn db = new dbconn(); ResultSet rs1 = null; String sql1 = "select distinct Cgreade from T_C"; rs1 = db.Query(sql1); while (rs1.next()) { sgreade.addItem(rs1.getString(1)); } sgreade.setSelectedItem(sclass); } jLabel5.setBounds(new Rectangle(69, 221, 68, 15)); //添加各组件 this.getContentPane().add(photo); this.getContentPane().add(jLabel2); this.getContentPane().add(jLabel3); this.getContentPane().add(jLabel4); this.getContentPane().add(jLabel6); this.getContentPane().add(jLabel5); this.getContentPane().add(Sname); this.getContentPane().add(SID); this.getContentPane().add(sex); this.getContentPane().add(sgreade); this.getContentPane().add(brith); this.getContentPane().add(quit); this.getContentPane().add(edit); this.getContentPane().add(jLabel1); edit.addActionListener(new ActionListener() { //给“保存”添加事件监视器 public void actionPerformed(ActionEvent e) { dbconn db = new dbconn(); String sxh = SID.getText(); String sxm = Sname.getText(); String sxb = (String) sex.getSelectedItem(); //.getText(); String sbj = (String) sgreade.getSelectedItem(); //.getText(); String ssr = brith.getText(); Date datel; datel=java.sql.Date.valueOf(ssr); sql = "update student set ID='" + sxh + "',name='" + sxm + "',sex='" + sxb + "',birthday=#" + datel + "#,greade='" + sbj + "' where ID='" + sid + "' and name='" + sname + "' and sex='" + ssex + "' and birthday=#" + sbrith + "# and greade='" + sclass + "'"; int i = db.Update(sql); if (i > 0) { JOptionPane.showMessageDialog(null, "修改成功!!"); sid=sxh;sname=sxm;ssex=sxb;sclass=sbj;sbrith=datel; } else { JOptionPane.showMessageDialog(null, "修改失败!!"); } } }); quit.addActionListener(new ActionListener() { //给“退出”添加事件监视器 public void actionPerformed(ActionEvent e) { //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE ); dispose();//setVisible(false); StuUI.qs.query.doClick(); } }); sql = "select * from student where ID='" + sid + "' and name='" + sname + "'"; ResultSet rs = null; try { String zp = ""; dbconn db = new dbconn(); rs = db.Query(sql); //查询相应的记录 /*if (rs.next()) { //如果是学生,则不能修改 SID.setText(rs.getString("ID")); SID.setEditable(false); Sname.setText(rs.getString("name")); Sname.setEditable(false); sex.equals(rs.getString("sex")); sex.setEnabled(false); brith.setText( (rs.getDate("birthday")).toString()); brith.setEditable(false); sgreade.equals(rs.getString("greade")); //sgreade.setText(rs.getString("greade")); sgreade.setEnabled(false); zp = rs.getString("photo"); if (!zp.equals("")) { photo.setIcon(new ImageIcon(zp)); } }*/ if (sf.equals("teacher")) { //如果是老师,可以进行修改 SID.setEditable(true); Sname.setEditable(true); sex.setEnabled(true); brith.setEnabled(true); sgreade.setEditable(true); }else{ if (rs.next()) { //如果是学生,则不能修改 SID.setText(rs.getString("ID")); SID.setEditable(false); Sname.setText(rs.getString("name")); Sname.setEditable(false); sex.setSelectedItem(rs.getString("sex")); sex.setEnabled(false); brith.setText((rs.getDate("birthday")).toString()); brith.setEditable(false); sgreade.setSelectedItem(rs.getString("greade")); sgreade.setEnabled(false); zp = rs.getString("photo"); if (!zp.equals("")) { photo.setIcon(new ImageIcon(zp)); } } } db.close(); } catch (Exception e) { System.out.println(e.toString()); } } JLabel jLabel1 = new JLabel("学生基本信息"); JLabel jLabel2 = new JLabel("学号:"); JTextField SID = new JTextField(); JLabel jLabel3 = new JLabel("姓名:"); JTextField Sname = new JTextField(); JLabel jLabel4 = new JLabel("性别:"); //JTextField sex = new JTextField(); JComboBox sex = new JComboBox(); JLabel jLabel5 = new JLabel("出生日期:"); JTextField brith = new JTextField(); JLabel jLabel6 = new JLabel("班级:"); JComboBox sgre
评论
    相关推荐