亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? studentinfopanel.java~80~

?? 使用JBuilder基于Oracle數據庫的課程作業
?? JAVA~80~
?? 第 1 頁 / 共 2 頁
字號:
package StudentManageSystem.factionpanels.infopanel;

import javax.swing.JFormattedTextField;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JLabel;
import com.borland.jbcl.layout.XYConstraints;
import StudentManageSystem.link.SQLRunner;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
import java.sql.SQLException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import javax.swing.text.DateFormatter;
import java.text.SimpleDateFormat;
import java.text.DateFormat;
//import java.sql.Date;
import java.util.Date;
import java.util.StringTokenizer;
import java.util.GregorianCalendar;

public class StudentInfoPanel extends InfoPanel {
    JLabel jLabel_name = new JLabel();
    JLabel jLabel_nation = new JLabel();
    JLabel jLabel_source = new JLabel();
    JLabel jLabel_home_phone = new JLabel();
    JLabel jLabel_stu_no = new JLabel();
    JLabel jLabel_birthday = new JLabel();
    JLabel jLabel_score = new JLabel();
    JLabel jLabel_address = new JLabel();
    JLabel jLabel_sex = new JLabel();
    JLabel jLabel_polity = new JLabel();
    JLabel jLabel_college = new JLabel();
    JLabel jLabel13 = new JLabel();
    JLabel jLabel14 = new JLabel();
    JLabel jLabel11 = new JLabel();
    JLabel jLabel15 = new JLabel();
    JTextField jTextField_name = new JTextField();
    JTextField jTextField_stu_no = new JTextField();
    JComboBox jComboBox_sex = new JComboBox();
    JComboBox jComboBox_nation = new JComboBox();
    DateFormat format=new SimpleDateFormat("yyyy-MM-dd");
    DateFormatter df=new DateFormatter(format);
    JFormattedTextField jFormattedTextField_birthday=new JFormattedTextField(df);
    //JFormattedTextField jFormattedTextField_birthday = new JFormattedTextField(new AbstractFormatter());
    JComboBox jComboBox_polity = new JComboBox();
    JTextField jTextField_score = new JTextField();
    JTextField jTextField_home_phone = new JTextField();
    JComboBox jComboBox_source = new JComboBox();
    JTextField jTextField_address = new JTextField();
    JComboBox jComboBox_college = new JComboBox();
    JComboBox jComboBox_department = new JComboBox();
    JComboBox jComboBox_class = new JComboBox();
    JComboBox jComboBox_Build_no = new JComboBox();
    JComboBox jComboBox_apartment_no = new JComboBox();

    public StudentInfoPanel(boolean e){
        try {
            initialize(e);//初始化父類
        } catch (Exception ex) {
        }
    }
    protected void initialize(boolean e){
        try {
            super.initialize(e);
            jLabel_name.setText("姓名");
            jLabel_nation.setText("民族");
            jLabel_source.setText("學生來源");
            jLabel_home_phone.setText("家庭聯系電話");
            jLabel_stu_no.setText("學號");
            jLabel_birthday.setText("出生日期");
            jLabel_score.setText("入學成績");
            jLabel_address.setText("家庭住址");
            jLabel_sex.setText("性別");
            jLabel_polity.setText("政治面貌");
            jLabel_college.setText("學院");
            jLabel13.setText("系");
            jLabel14.setText("班");
            jLabel11.setText("號樓");
            jLabel15.setText("宿舍");

            this.add(jLabel_birthday, new XYConstraints(38, 102, 97, 42));
            this.add(jLabel_score, new XYConstraints(448, 106, 98, 35));
            this.add(jLabel_address, new XYConstraints(38, 240, 97, 35));
            this.add(jLabel_stu_no, new XYConstraints(183, 38, 36, 38));
            this.add(jLabel_name, new XYConstraints(38, 38, 37, 39));
            this.add(jLabel_nation, new XYConstraints(505, 40, 46, 36));
            this.add(jLabel_source, new XYConstraints(38, 171, 73, 42));
            this.add(jLabel_home_phone, new XYConstraints(259, 175, -1, 35));
            this.add(jLabel_polity, new XYConstraints(253, 101, 58, 42));
            this.add(jTextField_home_phone, new XYConstraints(354, 175, 185, 33));
            this.add(jComboBox_source, new XYConstraints(128, 177, 102, 30));
            this.add(jComboBox_polity, new XYConstraints(318, 105, 94, 31));
            this.add(jComboBox_nation, new XYConstraints(552, 40, 100, 30));
            this.add(jTextField_name, new XYConstraints(85, 39, 76, 31));
            this.add(jTextField_stu_no, new XYConstraints(218, 40, 94, 30));
            //jFormattedTextField_birthday.setValue(new Date());
            this.add(jFormattedTextField_birthday, new XYConstraints(104, 107, 140, 32));
            this.add(jTextField_score, new XYConstraints(530, 107, 89, 29));
            this.add(jTextField_address, new XYConstraints(113, 242, 532, 32));
            this.add(jLabel13, new XYConstraints(573, 302, 92, 36));
            this.add(jLabel_college, new XYConstraints(274, 302, 103, 36));
            this.add(jComboBox_class, new XYConstraints(23, 358, 224, 30));
            this.add(jLabel14, new XYConstraints(276, 353, 89, 36));
            this.add(jLabel11, new XYConstraints(423, 358, 86, 33));
            this.add(jLabel15, new XYConstraints(579, 354, 86, 41));
            this.add(jComboBox_college, new XYConstraints(24, 302, 238, 32));
            this.add(jComboBox_department, new XYConstraints(386, 304, 175, 31));
            this.add(jComboBox_Build_no, new XYConstraints(355, 358, 65, 32));
            this.add(jComboBox_apartment_no, new XYConstraints(474, 358, 99, 32));
            this.add(jComboBox_sex, new XYConstraints(395, 40, 59, 29));
            this.add(jLabel_sex, new XYConstraints(345, 35, 51, 36));
        } catch (Exception ex) {
        }
        jComboBox_college.addActionListener(new
                MyStudentInfoPanel_jComboBox_college_actionAdapter(this));
        jComboBox_department.addActionListener(new
                MyStudentInfoPanel_jComboBox_department_actionAdapter(this));
        jComboBox_Build_no.addActionListener(new
                MyStudentInfoPanel_jComboBox_Build_no_actionAdapter(this));
    }
    public void setSwingEnable(boolean e) {//父類初始化調用
        jTextField_home_phone.setEnabled(e);
        jComboBox_source.setEnabled(e);
        jComboBox_polity.setEnabled(e);
        jComboBox_nation.setEnabled(e);
        jTextField_name.setEnabled(e);
        jTextField_stu_no.setEnabled(e);
        jFormattedTextField_birthday.setEnabled(e);
        jTextField_score.setEnabled(e);
        jTextField_address.setEnabled(e);
        jComboBox_class.setEnabled(e);
        jComboBox_college.setEnabled(e);
        jComboBox_department.setEnabled(e);
        jComboBox_Build_no.setEnabled(e);
        jComboBox_apartment_no.setEnabled(e);
        jComboBox_sex.setEnabled(e);

    }

    public boolean delete() {//父類按鈕響應
        try {
            ResultSet rs=SQLRunner.getResult("select * from studentinfo where stu_no='"+keyValue+"'");
            if (!rs.next())return false;
            String birthday=rs.getString("createdate");
            Date d=new Date(Date.parse(birthday));
            GregorianCalendar gc=new GregorianCalendar(d.getYear(),d.getMonth(),d.getDay());
            Date now=new Date();
            GregorianCalendar gcn=new GregorianCalendar(now.getYear(),now.getMonth(),now.getDay());
            gc.add(GregorianCalendar.DATE,21);
            if(gc.after(gcn)){
                JOptionPane.showMessageDialog(null,"學生紀錄創建已超過制定天數,不得刪除","系統提示",JOptionPane.ERROR_MESSAGE);
                return false;
            }
            return SQLRunner.executSql("delete from student where stu_no='"+keyValue+"'");
        } catch (SQLException ex) {
            return false;
        }


    }

    public boolean update() {//父類按鈕響應
        try{
            boolean roomchanged=true;
            String class_no;
            if(jComboBox_class.getSelectedItem()==null){
                class_no="";
            }else{
                String clname=(String)(jComboBox_class.getSelectedItem());
                ResultSet rs=SQLRunner.getResult("select * from class where clname='"+clname+"'");
                if(!rs.next())return false;
                class_no=rs.getString("class_no").trim();
            }
            String score=jTextField_score.getText().trim();
            if(score.equals(""))score="null";
            String sname=jTextField_name.getText().trim();
            if(sname.equals("")){
                JOptionPane.showMessageDialog(null,"姓名不能為空","系統提示",JOptionPane.ERROR_MESSAGE);
                return false;
            }
            String stu_no=jTextField_stu_no.getText().trim();
            String home_phone=jTextField_home_phone.getText().trim();
            String address=jTextField_address.getText().trim();
            String birthday=jFormattedTextField_birthday.getText().trim();

            String nation;
            if(jComboBox_nation.getSelectedItem()==null){
                nation="";
            }else{
                nation=((String)jComboBox_nation.getSelectedItem()).trim();
            }String Build_no;
            if(jComboBox_Build_no.getSelectedItem()==null){
                Build_no="";
            }else{
                Build_no=((String)jComboBox_Build_no.getSelectedItem()).trim();
            }String sex;
            if(jComboBox_sex.getSelectedItem()==null){
                sex="";
            }else{
                sex=((String)jComboBox_sex.getSelectedItem()).trim();
            }String polity;
            if(jComboBox_polity.getSelectedItem()==null){
                polity="";
            }else{
                polity=((String)jComboBox_polity.getSelectedItem()).trim();
            }String source;
            if(jComboBox_source.getSelectedItem()==null){
                source="";
            }else{
                source=((String)jComboBox_source.getSelectedItem()).trim();
            }String dorm_no;
            if(jComboBox_Build_no.getSelectedItem()==null||jComboBox_apartment_no.getSelectedItem()==null){
                dorm_no="";
            }else{
                dorm_no=((String)jComboBox_Build_no.getSelectedItem()).trim()+((String)jComboBox_apartment_no.getSelectedItem()).trim();
            }
            ResultSet rss=SQLRunner.getResult("select distinct dorm_no from studentinfo where stu_no='"+keyValue+"'");
            if(!rss.next())return false;
            if(dorm_no.equals(rss.getString("dorm_no")))roomchanged=false;
            ResultSet rns=SQLRunner.getResult("select livein from dormitory where dorm_no='"+rss.getString("dorm_no")+"'");
            if(!rns.next())return false;
            String nlive=rns.getString("livein");
            ResultSet room=SQLRunner.getResult("select * from dormitory where dorm_no='"+dorm_no+"'");
            if(!room.next())return false;
            if(!sex.equals(room.getString("sex").trim())){
                JOptionPane.showMessageDialog(null,"性別與宿舍不匹配","系統提示",JOptionPane.ERROR_MESSAGE);
                return false;
            }
            String livein=room.getString("livein").trim();
            String capacity=room.getString("CAPACITY").trim();
            if(Integer.parseInt(livein)>=Integer.parseInt(capacity)&&roomchanged){
                JOptionPane.showMessageDialog(null,"宿舍已滿","系統提示",JOptionPane.ERROR_MESSAGE);
                return false;
            }
            String updatesql="update student set class_no='"+class_no+"',dorm_no='"+dorm_no+"',nation='"+nation+"',polity='"+polity+"',sex='"+sex+"',source='"+source+"',home_phone='"+home_phone+"',address='"+address+"',score="+score+",sname='"+sname+"',birthday=to_date('"+birthday+"','yyyy-mm-dd'"+") where stu_no='"+stu_no+"'";
            return SQLRunner.executSql(updatesql);
        }catch(Exception e){
            JOptionPane.showMessageDialog(null,e.toString(),"系統提示",JOptionPane.ERROR_MESSAGE);
            return false;
        }
    }

    public boolean insert() {//父類按鈕響應
        try{
            String class_no;
            if(jComboBox_class.getSelectedItem()==null){
                class_no="";
            }else{
                String clname=(String)(jComboBox_class.getSelectedItem());

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成av人片一区二区| 欧美一区二区三区人| 欧美日韩五月天| 久久久影视传媒| 日韩中文字幕一区二区三区| 99亚偷拍自图区亚洲| 精品入口麻豆88视频| 亚洲第一成人在线| 色狠狠av一区二区三区| 国产精品三级视频| 日韩vs国产vs欧美| 在线精品观看国产| 亚洲欧美另类小说| yourporn久久国产精品| 国产欧美视频一区二区| 精品影视av免费| 日韩精品一区二区三区四区 | 国产女人18水真多18精品一级做| 亚洲一线二线三线视频| a亚洲天堂av| 欧美国产欧美亚州国产日韩mv天天看完整| 日本亚洲一区二区| 欧美久久久久久蜜桃| 亚洲图片欧美色图| 欧美四级电影在线观看| 亚洲精品免费视频| 91国偷自产一区二区三区成为亚洲经典 | 精品国产免费久久| 久久精品国产澳门| 精品国产乱子伦一区| 久久精品国产亚洲高清剧情介绍| 3d成人动漫网站| 日本伊人午夜精品| 日韩精品一区二区三区swag| 免费成人深夜小野草| 日韩美女视频在线| 国产成人亚洲精品狼色在线| 国产欧美一区二区精品秋霞影院| 国产精品亚洲人在线观看| 2014亚洲片线观看视频免费| 国产福利视频一区二区三区| 国产欧美一区二区精品性| jiyouzz国产精品久久| 亚洲欧洲精品一区二区三区不卡| 91一区二区在线观看| 最新不卡av在线| 欧美日韩综合在线免费观看| 美日韩一区二区| 欧美精品一区二区精品网| 国产福利91精品一区| 亚洲图片激情小说| 欧美日韩一区二区欧美激情| 热久久国产精品| 欧美精彩视频一区二区三区| 色综合天天性综合| 日本怡春院一区二区| 国产色综合一区| 色屁屁一区二区| 成人免费毛片高清视频| 国产精品美女www爽爽爽| 欧美视频在线播放| 韩国毛片一区二区三区| 亚洲精选视频免费看| 欧美一区二区视频在线观看2022| 国产真实乱子伦精品视频| 亚洲女性喷水在线观看一区| 欧美精品 国产精品| 国产91丝袜在线播放九色| 一区二区三区蜜桃| 久久久激情视频| 欧美日韩免费观看一区二区三区| 韩国毛片一区二区三区| 亚洲国产精品自拍| 亚洲国产高清aⅴ视频| 欧美视频中文一区二区三区在线观看| 国产精品综合一区二区三区| 亚洲三级在线免费| 久久久99久久精品欧美| 欧美日韩国产色站一区二区三区| 国产一区二区导航在线播放| 午夜精品久久久久久久99水蜜桃| 欧美激情在线看| 91精品国产91综合久久蜜臀| 91视频免费观看| 国产一区二区伦理| 日韩精品免费视频人成| 亚洲人成伊人成综合网小说| 久久―日本道色综合久久| 欧美日韩成人一区| 色菇凉天天综合网| 不卡免费追剧大全电视剧网站| 麻豆国产欧美日韩综合精品二区| 亚洲国产成人va在线观看天堂 | 久久网站热最新地址| 欧美性猛片aaaaaaa做受| 成人av手机在线观看| 国产在线一区二区| 精品制服美女久久| 日韩激情av在线| 午夜精品久久久久久久久久| 亚洲欧美日韩中文字幕一区二区三区 | 精油按摩中文字幕久久| 日韩专区在线视频| 午夜精彩视频在线观看不卡| 夜夜嗨av一区二区三区四季av | 欧美日韩你懂得| 在线免费观看日本欧美| 一本色道**综合亚洲精品蜜桃冫| 高清成人在线观看| 国产精品996| 风流少妇一区二区| 国产激情视频一区二区三区欧美| 国产揄拍国内精品对白| 国产一区二区美女诱惑| 国产精品白丝jk白祙喷水网站 | 色综合咪咪久久| 色噜噜狠狠色综合中国| 在线一区二区视频| 欧美老女人第四色| 91精品国产91综合久久蜜臀| 日韩欧美国产高清| 精品免费国产二区三区 | 日韩美女一区二区三区四区| 日韩免费性生活视频播放| 日韩一级大片在线观看| 精品福利一区二区三区免费视频| 久久先锋资源网| 国产精品大尺度| 亚洲五月六月丁香激情| 日韩成人av影视| 国产精品资源在线看| 99久久精品国产一区二区三区| 日本乱人伦aⅴ精品| 欧美妇女性影城| 日韩精品在线看片z| 国产精品视频一二三| 亚洲曰韩产成在线| 六月丁香综合在线视频| 风间由美一区二区三区在线观看| 91香蕉视频mp4| 欧美精品第1页| 国产欧美一区二区精品性色| 一区二区三区在线视频观看 | 欧美精品丝袜中出| www国产成人| 一区二区三区在线视频观看| 人人精品人人爱| 成人av片在线观看| 69堂成人精品免费视频| 国产欧美一区二区精品性| 亚洲国产色一区| 国产成人亚洲综合a∨婷婷| 欧美无砖专区一中文字| 国产亚洲一区二区三区在线观看| 一区二区三区毛片| 欧美在线不卡一区| 国产色综合久久| 午夜在线成人av| 99视频超级精品| 精品国产网站在线观看| 亚洲一区二区三区中文字幕 | 中文字幕亚洲综合久久菠萝蜜| 日韩av在线播放中文字幕| 91在线视频官网| 久久久不卡网国产精品一区| 日韩精品一级中文字幕精品视频免费观看 | 91丨porny丨国产| 欧美精品一区二| 天堂精品中文字幕在线| 91免费在线播放| xfplay精品久久| 免费欧美高清视频| 欧美午夜精品一区| 自拍偷拍亚洲欧美日韩| 国产一区 二区 三区一级| 欧美日本在线一区| 一区二区三区免费网站| 91玉足脚交白嫩脚丫在线播放| 久久影院午夜论| 免费成人av在线| 欧美三电影在线| 亚洲午夜精品网| 欧美性大战xxxxx久久久| 国产精品久久久久久亚洲毛片| 激情图片小说一区| 欧美电影精品一区二区| 成人av影院在线| 久久色视频免费观看| 久久97超碰国产精品超碰| 91精品国产色综合久久不卡蜜臀| 亚洲综合在线视频| 欧美综合视频在线观看| 亚洲欧美精品午睡沙发| 色婷婷精品久久二区二区蜜臀av| 亚洲欧洲日产国产综合网| 成人毛片在线观看| 国产视频一区二区在线观看| 国产成人高清在线| 亚洲国产精品99久久久久久久久| 国产成人久久精品77777最新版本|