}
if(flag!=0){ }
return flag;
for(int i=1;i for(int i=2;i String sql = \+math+\ +\+score_ave+\ +\+score_tea+\+score_syn+\if(temp_score[i]!=null){ } flag=2;return flag; if(temp_info[i]==null){ } flag=1;return flag; '\+physics+\+english '\+score_tog+\+score_pol sno = '\+sno+\; executeUpdate(sql); orderStudent_no_test(); orderStudent_no_syn(); return flag=3; public void deleteStudent_sno(String sno) { } public String[][] queryStudents_all() { String[][] rows = null; try { Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \; ResultSet rs = cmd.executeQuery(sql); rs.next(); int rowcount = rs.getInt(1); rows = new String[rowcount][15]; String sql = \ from stu_pro where sno='\ + sno + \; executeUpdate(sql); orderStudent_no_test(); orderStudent_no_syn(); Word 资料 } } sql = \; rs = cmd.executeQuery(sql); rowcount = 0; while (rs.next()) { } con.close(); ex.printStackTrace(); for (int i = 1; i <= 15; i++) rows[rowcount][i - 1] = rs.getString(i); rowcount++; } catch (Exception ex) { return rows; public String[][] queryStudents_info_all() { } public String[][] queryStudents_score_all(int t) { String[][] rows = null; try { String[][] rows = null; try { } return rows; Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \; ResultSet rs = cmd.executeQuery(sql); rs.next(); int rowcount = rs.getInt(1); rows = new String[rowcount][5]; sql = \; rs = cmd.executeQuery(sql); rowcount = 0; while (rs.next()) { } con.close(); ex.printStackTrace(); for (int i = 1; i <= 5; i++) rows[rowcount][i - 1] = rs.getString(i); rowcount++; } catch (Exception ex) { Word 资料 } } Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \; ResultSet rs = cmd.executeQuery(sql); rs.next(); int rowcount = rs.getInt(1); rows = new String[rowcount][12]; switch(t){ case 0:sql = \;break; case 1:sql = \;break; case 2:sql = \;break; } rs = cmd.executeQuery(sql); rowcount = 0; while (rs.next()) { } con.close(); ex.printStackTrace(); rows[rowcount][0] = rs.getString(1); rows[rowcount][1] = rs.getString(2); for (int i = 6; i <= 15; i++) rows[rowcount][i - 4] = rs.getString(i); rowcount++; } catch (Exception ex) { return rows; public String[] queryStudents_score_one(String sno) { String[] rows = null; try { Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \+sno+\; ResultSet rs = cmd.executeQuery(sql); rs.next(); rows = new String[12]; rows[0] = rs.getString(1); rows[1] = rs.getString(2); for (int i = 6; i <= 15; i++) rows[i - 4] = rs.getString(i); con.close(); Word 资料 } } } catch (Exception ex) { } return rows; ex.printStackTrace(); public String[] queryStudents_info_one(String sno) { } String[] rows = null; try { } return rows; Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \+sno+\; ResultSet rs = cmd.executeQuery(sql); rs.next(); rows = new String[5]; for (int i = 1; i <= 5; i++) rows[i-1] = rs.getString(i); con.close(); ex.printStackTrace(); } catch (Exception ex) { public boolean isExist(String sno){ } int flag=0; try { } if(flag==1) return true; else return false; Class.forName(driver); Connection con = DriverManager.getConnection(url); Statement cmd = con.createStatement(); String sql = \+sno+\; ResultSet rs = cmd.executeQuery(sql); rs.next(); flag=rs.getInt(1); con.close(); ex.printStackTrace(); } catch (Exception ex) { Word 资料 package project; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class AddStudentFrm_info extends JFrame implements ActionListener { public AddStudentFrm_info() { JPanel jp = (JPanel) this.getContentPane(); JPanel jp1 = new JPanel(); jp1.setLayout(new GridLayout(6, 2, 5, 10)); jp1.add(lb_sno); jp1.add(txt_sno); jp1.add(lb_sname); jp1.add(txt_sname); jp1.add(lb_sex); jp1.add(cmb_sex); cmb_sex.addItem(\男\); cmb_sex.addItem(\女\); jp1.add(lb_add); jp1.add(txt_add); jp1.add(lb_tel); jp1.add(txt_tel); jp1.add(btn_add); jp1.add(btn_del); jp.add(jp1, BorderLayout.NORTH); btn_add.addActionListener(this); btn_del.addActionListener(this); this.setSize(400, 260); this.setVisible(true); this.setTitle(\添加学生信息\); StudentDao studentDao = new StudentDao(); JButton btn_add = new JButton(\确定\); JButton btn_del = new JButton(\取消\); JLabel lb_sno = new JLabel(\学号\); JLabel lb_sname = new JLabel(\姓名\); JLabel lb_sex = new JLabel(\性别\); JLabel lb_add = new JLabel(\家庭地址\); JLabel lb_tel = new JLabel(\联系\); JTextField txt_sno = new JTextField(); JTextField txt_sname = new JTextField(); JComboBox cmb_sex = new JComboBox(); JTextField txt_add = new JTextField(); JTextField txt_tel = new JTextField(); Word 资料