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

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

?? dingpiaofrm.java

?? JAVA數據庫編程實例隨書源碼
?? JAVA
字號:
package train_table;import java.awt.*;import javax.swing.*;import com.borland.jbcl.layout.*;import javax.swing.border.*;import com.borland.dbswing.*;import java.util.Calendar;import java.awt.event.*;import java.sql.*;public class dingpiaoFrm extends JFrame { errormessage em=new errormessage();          //判斷錯誤信息  Calendar curdate=Calendar.getInstance() ;   //日歷  String[] shijian=new String[]{"今天","明天","后天"};  private JComboBox jComboBox1 = new JComboBox(shijian);  int  year=curdate.get(Calendar.YEAR ) ;     //獲得年  int  month =curdate.get(Calendar.MONTH)+1 ;  //獲得月  int  day =curdate.get(Calendar.DAY_OF_MONTH) ;//獲得日  private JPanel jPanel1 = new JPanel();  private XYLayout xYLayout1 = new XYLayout();  private TitledBorder titledBorder1;  private XYLayout xYLayout2 = new XYLayout();  private JPanel jPanel2 = new JPanel();  private TitledBorder titledBorder2;  private XYLayout xYLayout3 = new XYLayout();  private JPanel jPanel3 = new JPanel();  private TitledBorder titledBorder3;  private JLabel jLabel2 = new JLabel();  private JLabel jLabel3 = new JLabel();  private XYLayout xYLayout4 = new XYLayout();  private JdbTextField times_txt = new JdbTextField();  private JdbTextField station_txt = new JdbTextField();  private JLabel jLabel1 = new JLabel();  private JLabel jLabel4 = new JLabel();  private JPanel jPanel5 = new JPanel();  private JPanel jPanel6 = new JPanel();  private JLabel jLabel5 = new JLabel();  private Border border1;  private TitledBorder titledBorder4;  private JLabel jLabel6 = new JLabel();  private XYLayout xYLayout5 = new XYLayout();  private TitledBorder titledBorder5;  private JLabel jLabel7 = new JLabel();  private JLabel jLabel8 = new JLabel();  private JTextField yingzuo_txt = new JTextField();  private JTextField wopu_txt = new JTextField();  private JButton jButton2 = new JButton();  private JButton jButton3 = new JButton();  private JLabel jLabel9 = new JLabel();  private JTextField zhangshu_txt = new JTextField();  private JButton jButton1 = new JButton();  private JRadioButton jRadioButton1 = new JRadioButton();  private JRadioButton jRadioButton2 = new JRadioButton();  private TitledBorder titledBorder6;  private TitledBorder titledBorder7;  private JLabel log_label = new JLabel();  private XYLayout xYLayout6 = new XYLayout();  private JButton jButton4 = new JButton();  private TitledBorder titledBorder8;  public dingpiaoFrm() {    try {      jbInit();      pack();    }    catch(Exception e) {      e.printStackTrace();    }  }  private void jbInit() throws Exception {   String date=Integer.toString(year)+"-"+Integer.toString(month)+"-"+Integer.toString(day);   titledBorder8 = new TitledBorder("");    jLabel6.setText(date);    titledBorder1 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(151, 145, 140)),"");    titledBorder2 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(151, 145, 140)),"數據加載方法");    titledBorder3 = new TitledBorder("");    border1 = BorderFactory.createEtchedBorder(Color.white,new Color(151, 145, 140));    titledBorder4 = new TitledBorder("");    titledBorder5 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(151, 145, 140)),"當前時間");    titledBorder6 = new TitledBorder("");    titledBorder7 = new TitledBorder("");    this.getContentPane().setLayout(xYLayout1);    jPanel1.setLayout(xYLayout2);    this.setTitle("訂票系統");    jPanel2.setBorder(titledBorder8);    jPanel2.setLayout(xYLayout3);    jPanel3.setBorder(titledBorder3);    jPanel3.setLayout(xYLayout4);    jLabel2.setText("車次");    jLabel3.setText("車站");    jLabel1.setText("1.定票時間必須為三天以內的票");    jLabel4.setText("2.本系統只屬模擬不涉及票額的計算");    jPanel5.setBorder(titledBorder5);    jPanel5.setLayout(xYLayout5);    jPanel6.setBorder(titledBorder1);    jPanel6.setLayout(xYLayout6);    jLabel5.setText("訂票時間");    jPanel1.setBorder(border1);    jLabel6.setForeground(new Color(177, 66, 138));    jLabel7.setText("硬座余票");    jLabel8.setText("臥鋪余票");    jButton2.setEnabled(false);    jButton2.setText("訂票打印");    jButton2.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton2_actionPerformed(e);      }    });    jButton3.setEnabled(false);    jButton3.setText("打印欲覽");    yingzuo_txt.setEditable(false);    yingzuo_txt.setHorizontalAlignment(SwingConstants.RIGHT);    xYLayout1.setWidth(417);    xYLayout1.setHeight(324);    jLabel9.setText("預定張數");    jButton1.setActionCommand("");    jButton1.setText("查看余票");    jButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton1_actionPerformed(e);      }    });    jRadioButton1.setSelected(true);    jRadioButton1.setText("硬座");    jRadioButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jRadioButton1_actionPerformed(e);      }    });    jRadioButton2.setText("臥鋪");    jRadioButton2.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jRadioButton2_actionPerformed(e);      }    });    zhangshu_txt.setText("1");    zhangshu_txt.setHorizontalAlignment(SwingConstants.RIGHT);    wopu_txt.setEditable(false);    wopu_txt.setHorizontalAlignment(SwingConstants.RIGHT);    jButton4.setText("清空");    jButton4.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton4_actionPerformed(e);      }    });    log_label.setForeground(SystemColor.activeCaption);    log_label.setHorizontalTextPosition(SwingConstants.CENTER);    this.getContentPane().add(jPanel1,             new XYConstraints(7, 6, 400, 291));    jPanel1.add(jPanel2,           new XYConstraints(3, 12, 207, 83));    jPanel2.add(jLabel1,   new XYConstraints(6, 9, -1, -1));    jPanel2.add(jLabel4,   new XYConstraints(6, 37, -1, -1));    jPanel1.add(jPanel3,                   new XYConstraints(5, 103, 382, 99));    jPanel3.add(jLabel2, new XYConstraints(23, 2, -1, -1));    jPanel3.add(times_txt,   new XYConstraints(78, 2, 79, -1));    jPanel3.add(station_txt,      new XYConstraints(78, 30, 79, -1));    jPanel3.add(jLabel3,       new XYConstraints(23, 30, -1, -1));    jPanel3.add(yingzuo_txt,  new XYConstraints(259, 2, 87, -1));    jPanel3.add(wopu_txt,   new XYConstraints(260, 30, 86, -1));    jPanel3.add(jLabel7,  new XYConstraints(196, 2, -1, -1));    jPanel3.add(jLabel8,      new XYConstraints(197, 34, -1, -1));    jPanel3.add(jButton4,  new XYConstraints(277, 62, 74, 24));    jPanel3.add(jLabel5, new XYConstraints(15, 62, -1, -1));    jPanel3.add(jComboBox1, new XYConstraints(78, 62, 79, -1));    jPanel3.add(jButton1, new XYConstraints(195, 62, 82, 24));    jPanel1.add(jRadioButton1, new XYConstraints(41, 210, -1, -1));    jPanel1.add(jLabel9, new XYConstraints(42, 251, -1, -1));    jPanel1.add(zhangshu_txt,   new XYConstraints(112, 246, 81, -1));    jPanel1.add(jRadioButton2, new XYConstraints(112, 210, -1, -1));    jPanel1.add(jButton3, new XYConstraints(249, 213, -1, 24));    jPanel1.add(jButton2, new XYConstraints(248, 245, -1, 24));    jPanel1.add(jPanel5, new XYConstraints(218, 5, 170, 55));    jPanel5.add(jLabel6, new XYConstraints(42, 0, 98, 20));    jPanel1.add(jPanel6, new XYConstraints(220, 64, 167, 31));    jPanel6.add(log_label,       new XYConstraints(-1, 1, 157, 19));  } void jButton1_actionPerformed(ActionEvent e) {    String times=times_txt.getText();    String station=station_txt.getText();    String date1;     int i=0;     JianSuanShiJian jssj=new JianSuanShiJian();  if(!em.isEmpty(times)&&!em.isEmpty(station))     //輸入為空的處理      {     if(jComboBox1.getSelectedItem().equals("今天"))          {          jssj.getTime(year,month,day,i);          //對時間進行計算          date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);        }        else if(jComboBox1.getSelectedItem().equals("明天"))        {          jssj.getTime(year,month,day,i+1);        //對時間進行計算          date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);        }        else{          jssj.getTime(year,month,day,i+2);         //對時間進行計算          date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);        }           dbBean db=new dbBean();            ResultSet RS=null;           String SQL1="select * from checibiao where checibiao.\"車次\"='"+times+"' and checibiao.\"到達車站\"='"+station+"'";         try{           RS=db.executeQuery(SQL1);                  //查詢輸入的車次和車站           if(RS.next()){                             //判斷輸入的車次和車站是否存在             dbBean DB=new dbBean();             ResultSet rs=null;             String  sql="select * from dingpiao where times='"+times+"' and riqi='"+date1+"'" ;             try{           rs=  DB.executeQuery(sql);                //查詢輸入車次在某一天的是否存在             if(!rs.next())                          //若無則向數據庫中加入這一天的票數                 {                  String SQL="insert into dingpiao (times,riqi,yingzuo,wopu) values ('"+times+"','"+date1+"',"+500+","+200+")";                  db.executeQuery(SQL);                  yingzuo_txt.setText("500");                  wopu_txt.setText("200");               }               else{                                //否則將數據庫中的票數顯示出來                yingzuo_txt.setText(rs.getString("yingzuo"));                wopu_txt.setText(rs.getString("wopu"));               }               }               catch(Exception t)               {}               jButton2.setEnabled(true);               jButton3.setEnabled(true);           }else{               log_label.setText("查無此站");           }           }           catch(Exception ee){           }         }      else{     log_label.setText("車次車站不能為空");      }  }  void jRadioButton2_actionPerformed(ActionEvent e) {   //臥鋪選擇按鈕  jRadioButton1.setSelected(false);  zhangshu_txt.setText("1");  }  void jRadioButton1_actionPerformed(ActionEvent e) {   //硬座選擇按鈕    jRadioButton2.setSelected(false);    zhangshu_txt.setText("1");  }  void jButton4_actionPerformed(ActionEvent e) {        //清空處理   times_txt.setText("");   station_txt.setText("");   yingzuo_txt.setText("");   wopu_txt.setText("");  }  void jButton2_actionPerformed(ActionEvent e) {      //訂票處理事件    String times=times_txt.getText();    String station=station_txt.getText();   String zhs=zhangshu_txt.getText();   dbBean db=new dbBean();    ResultSet rs=null;    ResultSet Rs=null;  JianSuanShiJian jssj=new JianSuanShiJian();   String date1;   int i=0;   int yupiao=0;   int yuwopu=0;   int zhangshu=0;   if(jComboBox1.getSelectedItem().equals("今天"))   //預定今天票的處理         {         jssj.getTime(year,month,day,i);            //時間計算         date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);       }       else if(jComboBox1.getSelectedItem().equals("明天"))  //預定明天票的處理       {         jssj.getTime(year,month,day,i+1);          //時間計算         date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);       }       else{                                        //預定后天票的處理         jssj.getTime(year,month,day,i+2);          //時間計算         date1=String.valueOf(year)+"-"+String.valueOf(month)+"-"+String.valueOf(day);        }       if(!em.isEmpty(zhs))                //判斷輸入是否為空       {          if(em.isNum(zhs)){               //判斷輸入的張數是否是數字        zhangshu=Integer.parseInt(zhs);        yuwopu=Integer.parseInt(wopu_txt.getText())-zhangshu;        yupiao=Integer.parseInt(yingzuo_txt.getText())-zhangshu;      if(jRadioButton1.isSelected())       //預定硬座票的處理         {        if((yupiao)>=0){                   //判斷票數是否足夠       String sql2="update dingpiao set yingzuo="+yupiao+" where times='"+times+"'and riqi='"+date1+"'";       db.executeQuery(sql2);              //完成訂票,并更新數據庫        yingzuo_txt.setText(Integer.toString(yupiao)); //顯示余票        }           else{             JOptionPane.showMessageDialog(null, "硬座票數量不夠!根據余票合理訂票");             zhangshu_txt.setText("");           }           }           else{                            //處理預定臥鋪的情況             if(yuwopu>=0)                  //判斷臥鋪票是否足夠             {               String sql2="update dingpiao set wopu="+yuwopu+" where times='"+times+"' and riqi='"+date1+"'";               db.executeQuery(sql2);       //完成訂票,并更新數據庫               wopu_txt.setText(Integer.toString(yuwopu));               log_label.setText("訂票成功!");             }             else{                JOptionPane.showMessageDialog(null, "臥鋪票數量不夠!");             }           }         }         else{           log_label.setText("輸入必須為數字");       zhangshu_txt.setText("");         }       }   else{       log_label.setText("輸入不能為空!");       zhangshu_txt.setText("");    }}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区 在线观看视频| 日韩一区中文字幕| 久久精品欧美日韩| 亚洲综合区在线| 国产91精品一区二区麻豆网站| 欧美偷拍一区二区| 国产精品乱人伦| 久久成人免费网站| 欧美系列亚洲系列| 国产精品久久久久久久久搜平片 | 一区二区三区在线视频观看58| 日本va欧美va瓶| 91色综合久久久久婷婷| 久久久久久亚洲综合影院红桃| 亚洲va韩国va欧美va| 99久精品国产| 中文字幕精品一区二区精品绿巨人 | 777久久久精品| 国产日产欧美一区| 久久国产剧场电影| 欧美日韩美女一区二区| 中文字幕在线不卡国产视频| 国产一区二区三区免费播放 | 中文字幕一区二区三区精华液| 久久99精品国产91久久来源| 欧美色区777第一页| 亚洲欧洲美洲综合色网| 国产成人在线电影| 久久蜜臀精品av| 国产一区在线看| 精品三级在线观看| 精品中文字幕一区二区小辣椒| 欧美日韩国产精品自在自线| 一区二区三区**美女毛片| 色乱码一区二区三区88| 亚洲国产岛国毛片在线| 国产成人精品aa毛片| 久久久久久免费| 国产成人在线观看| 国产精品三级久久久久三级| 成人精品视频一区二区三区尤物| 久久精品夜夜夜夜久久| 国产ts人妖一区二区| 日本一区二区不卡视频| 成人免费av在线| 综合精品久久久| 一本大道av伊人久久综合| 亚洲一区二区精品视频| 欧美日韩综合一区| 蜜臀va亚洲va欧美va天堂| 日韩欧美国产成人一区二区| 久久国产三级精品| 欧美国产精品一区| 色94色欧美sute亚洲线路一ni | 亚洲一区欧美一区| 欧美精品第一页| 美国三级日本三级久久99| 久久精品一区二区三区四区| av一区二区三区黑人| 一区二区三区欧美激情| 欧美一区午夜视频在线观看| 激情综合色丁香一区二区| 国产精品国产三级国产普通话蜜臀| 97se亚洲国产综合自在线| 亚洲在线视频网站| 精品久久国产老人久久综合| 成人av网址在线| 亚洲午夜激情网站| 精品动漫一区二区三区在线观看| 国产成人一级电影| 亚洲自拍偷拍图区| 久久精品亚洲乱码伦伦中文| 色综合天天天天做夜夜夜夜做| 丝袜脚交一区二区| 欧美国产综合色视频| 欧美日韩一区不卡| 成人免费视频视频| 毛片一区二区三区| 亚洲欧美精品午睡沙发| 精品国产伦一区二区三区观看方式| 成人一级黄色片| 日本不卡视频一二三区| 国产精品理论片在线观看| 在线成人免费视频| av综合在线播放| 精品在线观看视频| 香蕉av福利精品导航| 国产精品久久久久久久久晋中 | 日本一区二区三级电影在线观看 | 18涩涩午夜精品.www| 91精品国产综合久久福利软件 | 亚洲精品一区在线观看| 日本高清不卡一区| 粉嫩欧美一区二区三区高清影视| 亚洲地区一二三色| 亚洲伦理在线精品| 欧美极品美女视频| 精品国产乱码久久久久久免费| 在线免费精品视频| av色综合久久天堂av综合| 韩国毛片一区二区三区| 日本中文在线一区| 亚洲一区二区在线免费看| 国产色一区二区| 精品久久久久久无| 欧美一区二区啪啪| 精品视频一区二区三区免费| 一本色道久久综合亚洲精品按摩| 国产成人综合自拍| 国产一区视频导航| 国模套图日韩精品一区二区 | 国产精品香蕉一区二区三区| 蜜桃一区二区三区在线| 日本欧美肥老太交大片| 亚洲18色成人| 午夜精品福利一区二区蜜股av| 一区二区三区色| 一区二区三区av电影| 亚洲最色的网站| 一区二区三区在线视频播放| 亚洲免费在线视频| 一区二区三区免费在线观看| 亚洲免费观看高清完整版在线| 亚洲欧洲一区二区在线播放| 国产精品久久久久久久岛一牛影视| 中文字幕第一区二区| 中文字幕一区在线观看| 亚洲少妇屁股交4| 亚洲精品日韩一| 同产精品九九九| 日本中文字幕不卡| 精品一二三四在线| 成人黄色av网站在线| 99精品热视频| 欧美视频你懂的| 日韩欧美一二三区| 国产视频一区二区在线| 亚洲欧洲国产日韩| 亚洲福利电影网| 九九视频精品免费| 顶级嫩模精品视频在线看| 99精品桃花视频在线观看| 欧美影片第一页| 精品国产制服丝袜高跟| 中文字幕免费在线观看视频一区| 最新中文字幕一区二区三区| 亚洲国产精品欧美一二99| 日本不卡1234视频| 成人免费黄色大片| 欧美日韩日本视频| 久久老女人爱爱| 亚洲免费av观看| 久久超碰97中文字幕| av不卡一区二区三区| 欧美色网一区二区| 国产亚洲一区二区在线观看| 日韩一区中文字幕| 激情亚洲综合在线| 在线影院国内精品| 久久亚洲二区三区| 亚洲风情在线资源站| 国产福利一区在线| 欧美二区三区的天堂| 国产视频一区在线观看| 午夜精品久久久| 99热99精品| 久久网站最新地址| 亚洲国产毛片aaaaa无费看| 极品美女销魂一区二区三区 | 激情五月婷婷综合网| 色综合久久综合| 久久久久久久久97黄色工厂| 亚洲国产一区视频| 暴力调教一区二区三区| 精品免费99久久| 午夜精品久久久久久不卡8050| 成人午夜激情在线| 日韩女优制服丝袜电影| 亚洲图片欧美色图| 99久久亚洲一区二区三区青草| 欧美变态凌虐bdsm| 午夜视频在线观看一区二区三区| 不卡一区二区中文字幕| 精品精品国产高清一毛片一天堂| 亚洲大尺度视频在线观看| 99久久综合99久久综合网站| 337p粉嫩大胆噜噜噜噜噜91av| 丝袜诱惑亚洲看片| 欧美色偷偷大香| 亚洲日本电影在线| bt欧美亚洲午夜电影天堂| 久久久国产精品麻豆| 狠狠狠色丁香婷婷综合久久五月| 欧美亚洲日本一区| 一区二区三区在线视频免费| 91美女在线看| 亚洲男人的天堂一区二区| 91猫先生在线| 亚洲精品日韩综合观看成人91| 91在线精品一区二区三区|