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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? student_information.java~75~

?? 成績管理系統(tǒng)可以對(duì)學(xué)生、課程、選課、成績的錄入、班級(jí)、用戶的信息進(jìn)行管理等
?? JAVA~75~
字號(hào):
package coursedesign;

import java.awt.*;
import javax.swing.*;
import java.awt.BorderLayout;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.borland.dbswing.JdbTable;
import com.borland.dbswing.JdbStatusLabel;
import com.borland.dbswing.JdbNavToolBar;
import com.borland.dx.sql.dataset.Database;
import com.borland.dx.dataset.DataSetView;
import com.borland.datastore.DataStore;
import com.borland.dx.sql.dataset.ConnectionDescriptor;
import com.borland.dx.sql.dataset.QueryDataSet;
import com.borland.dx.sql.dataset.QueryResolver;
import com.borland.dx.sql.dataset.Load;
import com.borland.dx.sql.dataset.QueryDescriptor;
import com.borland.dbswing.JdbTextField;
import com.borland.dbswing.TableScrollPane;
import com.borland.dbswing.JdbList;
import com.borland.dbswing.JdbSlider;
import com.borland.dbswing.JdbEditorPane;
import com.borland.dbswing.JdbLabel;
import java.sql.ResultSet;
import javax.swing.JOptionPane;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Student_Information
    extends JFrame {
  JButton jButton1 = new JButton();
  XYLayout xYLayout1 = new XYLayout();
  JButton jButton2 = new JButton();
  JButton jButton3 = new JButton();
  JButton jButton4 = new JButton();
  JdbTable jdbTable1 = new JdbTable();
  JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();
  Database student = new Database();
  QueryDataSet queryDataSet1 = new QueryDataSet();
  QueryResolver queryResolver1 = new QueryResolver();
  JdbTextField jdbTextField1 = new JdbTextField();
  JdbTextField jdbTextField2 = new JdbTextField();
  JdbTextField jdbTextField3 = new JdbTextField();
  JdbTextField jdbTextField4 = new JdbTextField();
  JdbTextField jdbTextField5 = new JdbTextField();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel2 = new JLabel();
  JLabel jLabel3 = new JLabel();
  JLabel jLabel4 = new JLabel();
  JLabel jLabel5 = new JLabel();
  JTextField jTextField1 = new JTextField();
  JTextField jTextField2 = new JTextField();
  JLabel jLabel6 = new JLabel();
  JLabel jLabel7 = new JLabel();
  JButton jButton5 = new JButton();
  public Student_Information() {
    try {
      setDefaultCloseOperation(EXIT_ON_CLOSE);
      jbInit();
    }
    catch (Exception exception) {
      exception.printStackTrace();
    }
  }

  private void jbInit() throws Exception {
    getContentPane().setLayout(xYLayout1);
    this.getContentPane().setBackground(UIManager.getColor(
        "InternalFrame.inactiveTitleForeground"));
    setSize(new Dimension(500, 400));
  setTitle("學(xué)生信息");
    jButton1.setText("退出");
    jButton1.addActionListener(new Student_Information_jButton1_actionAdapter(this));
    jButton2.setToolTipText("");
    jButton2.setAction(null);
    jButton2.setActionCommand("添加");
    jButton2.setText("添加");
    jButton2.addActionListener(new Student_Information_jButton2_actionAdapter(this));
    jButton3.setText("修改");
    jButton3.addActionListener(new Student_Information_jButton3_actionAdapter(this));
    jButton4.setText("刪除");
    jButton4.addActionListener(new Student_Information_jButton4_actionAdapter(this));
    student.setConnection(new ConnectionDescriptor(
        "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=student", "sa",
        "yaya", false, "com.microsoft.jdbc.sqlserver.SQLServerDriver",
        ConnectionDescriptor.arrayToProperties(new String[][] { {"serverName",
                                               ""}, {"hostProcess", ""},
                                               {"user", "sa"}, {"netAddress",
                                               ""},
                                               {"sendStringParametersAsUnicode ",
                                               "true"}, {"programName", ""},
                                               {"databaseName", "student"},
                                               {"selectMethod", "direct"},
                                               {"password", "yaya"},
                                               {"portNumber", "1433"},
    })));
    queryDataSet1.setReadOnly(true);
    queryDataSet1.setResolver(queryResolver1);
    queryDataSet1.setQuery(new QueryDescriptor(student,
                                               "select * from base_info", null, true,
                                               Load.ALL));
    queryResolver1.setDatabase(student);
    queryResolver1.setUpdateMode(com.borland.dx.dataset.UpdateMode.
                                 CHANGED_COLUMNS);
    jdbTable1.setDataSet(queryDataSet1);
    jdbNavToolBar1.setBackground(UIManager.getColor(
        "InternalFrame.inactiveTitleForeground"));

    jdbNavToolBar1.setDataSet(queryDataSet1);
    jdbTextField1.setHorizontalAlignment(SwingConstants.RIGHT);
    jdbTextField1.setColumnName("id");
    jdbTextField1.setDataSet(queryDataSet1);
    jdbTextField2.setHorizontalAlignment(SwingConstants.RIGHT);
    jdbTextField2.setColumnName("name");
    jdbTextField2.setDataSet(queryDataSet1);
    jdbTextField4.setHorizontalAlignment(SwingConstants.RIGHT);
    jdbTextField4.setColumnName("class");
    jdbTextField4.setDataSet(queryDataSet1);
    jdbTextField4.addActionListener(new
        Student_Information_jdbTextField4_actionAdapter(this));
    jdbTextField3.setColumnName("sex");
    jdbTextField3.setDataSet(queryDataSet1);
    jdbTextField5.setHorizontalAlignment(SwingConstants.RIGHT);
    jdbTextField5.setColumnName("address");
    jdbTextField5.setDataSet(queryDataSet1);
    jLabel1.setText("學(xué)號(hào):");
    jLabel2.setText("姓名:");
    jLabel3.setText("班級(jí):");
    jLabel5.setText("地址:");
    jLabel4.setText("性別:");
    jLabel6.setText("學(xué)號(hào):");
    jLabel7.setText("姓名:");
    jButton5.setText("查詢");
    jButton5.addActionListener(new Student_Information_jButton5_actionAdapter(this));
    this.getContentPane().add(jButton3, new XYConstraints(125, 19, 57, 23));
    this.getContentPane().add(jButton4, new XYConstraints(230, 19, 57, 23));
    this.getContentPane().add(jButton1, new XYConstraints(328, 19, 69, -1));
    this.getContentPane().add(jdbTextField3, new XYConstraints(79, 343, 88, -1));
    this.getContentPane().add(jLabel4, new XYConstraints(21, 345, -1, -1));
    this.getContentPane().add(jLabel5, new XYConstraints(180, 349, -1, -1));
    this.getContentPane().add(jButton2, new XYConstraints(20, 19, 63, -1));
    this.getContentPane().add(jdbTextField2, new XYConstraints(233, 303, 83, -1));
    this.getContentPane().add(jdbTable1, new XYConstraints(0, 182, 500, 100));
    this.getContentPane().add(jdbTextField1, new XYConstraints(69, 303, 91, -1));
    this.getContentPane().add(jLabel1, new XYConstraints(19, 306, 43, -1));
    this.getContentPane().add(jLabel3, new XYConstraints(346, 306, 44, -1));
    this.getContentPane().add(jdbTextField4, new XYConstraints(393, 303, 84, -1));
    this.getContentPane().add(jLabel2, new XYConstraints(178, 306, 40, -1));
    this.getContentPane().add(jdbTextField5, new XYConstraints(235, 344, 72, -1));
    this.getContentPane().add(jdbNavToolBar1,
                              new XYConstraints( -9, 141, 497, -1));
    this.getContentPane().add(jLabel6, new XYConstraints(16, 100, -1, -1));
    this.getContentPane().add(jTextField1, new XYConstraints(87, 94, 76, -1));
    this.getContentPane().add(jLabel7, new XYConstraints(191, 99, -1, -1));
    this.getContentPane().add(jTextField2, new XYConstraints(259, 95, 78, -1));
    this.getContentPane().add(jButton5, new XYConstraints(389, 92, -1, -1));
  }

  public void jButton1_actionPerformed(ActionEvent e) {
    dispose();
  }
//***************************添加學(xué)生信息*********************************
  public void jButton2_actionPerformed(ActionEvent actionEvent) {
    String input1 = JOptionPane.showInputDialog("請(qǐng)輸入學(xué)號(hào):");
    String input2 = JOptionPane.showInputDialog("請(qǐng)輸入姓名:");
    String input3 = JOptionPane.showInputDialog("請(qǐng)輸入班級(jí):");
    String input4 = JOptionPane.showInputDialog("請(qǐng)輸入性別:");
    String input5 = JOptionPane.showInputDialog("請(qǐng)輸入家庭地址:");
    try {
      Jdbcconn conn = new Jdbcconn();
  //連接數(shù)據(jù)庫
      conn.OpenConn("student", "sa", "yaya");
      String strSQL =
          "insert into base_info (id,name,class,sex,address) values ('" + input1 +
          "','" + input2 + "','" + input3 + "','" + input4 + "','" + input5 +
          "')";
      conn.executeUpdate(strSQL);
       //refreshComponent();
       queryDataSet1.refresh();//有必要加哦,否則表格里不會(huì)顯加新加的信息
      JOptionPane.showMessageDialog(null, "添加成功");
      //System.out.println("name");
    }
    catch (Exception ex) {
      System.out.println(ex.getMessage());
      JOptionPane.showMessageDialog(null, "數(shù)據(jù)庫沒有鏈接成功,數(shù)據(jù)沒有輸入成功!");

    }
  }
  public void jdbTextField4_actionPerformed(ActionEvent e) {

  }
//**********************************查詢學(xué)生基本信息*************************
  public void jButton5_actionPerformed(ActionEvent e) {
    String  Field1= jTextField1.getText().trim();
    String Field2 = jTextField2.getText().trim();
      if (Field1.equals("") || Field2.equals("")) {
        try{
        JOptionPane.showMessageDialog(null, "學(xué)號(hào)或姓名為空,不能查詢!");

    }catch (Exception ex) {
      System.out.println(ex.getMessage());
    }
  }//end if
  else
     {
       try{
         String sql="select * from chengjibiao where id='"+Field1+"'";
         queryDataSet1.close();
            //將SQL語句傳給queryDataSet1執(zhí)行。
            queryDataSet1.setQuery(new QueryDescriptor(student, sql, null, true,Load.ALL));

            //將queryDataSet1打開
            queryDataSet1.open();
            //刷新queryDataSet1
            queryDataSet1.refresh();
       }//end try
       catch(Exception ex)
       {
         JOptionPane.showMessageDialog(null, "Sorry!成績都已經(jīng)輸入");
       }//end catch
     }//end else

  }//此事件完成
//******************************修改學(xué)生信息*************************
  public void jButton3_actionPerformed(ActionEvent e) {

String id = jdbTextField1.getText().trim();
String Field2 = jdbTextField2.getText().trim();
String Field3 = jdbTextField1.getText().trim();
String Field4 = jdbTextField2.getText().trim();
String Field5 = jdbTextField1.getText().trim();

try {
  Jdbcconn conn = new Jdbcconn();
//連接數(shù)據(jù)庫
  conn.OpenConn("student", "sa", "yaya");
  String strSQL = "update base_info set  name='Field2',class='Field3',sex='Field4',address='Field5' where id='" +
      id + "'";
  conn.executeUpdate(strSQL);
  JOptionPane.showMessageDialog(null, "修改成功");
//queryDataSet1.refresh();
}
catch (Exception ex) {
  System.out.println(ex.getMessage());
  JOptionPane.showMessageDialog(null, "數(shù)據(jù)庫沒有鏈接成功,數(shù)據(jù)沒有修改成功!");
} //end catch





  }
  public static void main(String as[]){
    Student_Information dd=new Student_Information();
    dd.setVisible(true);
    dd.setLocationRelativeTo(null);
  }



//****************************刪除學(xué)生信息******************************
  public void jButton4_actionPerformed(ActionEvent e) {
     String input1=JOptionPane.showInputDialog("請(qǐng)輸入要?jiǎng)h除的學(xué)生號(hào)學(xué)號(hào)");
     String input2=JOptionPane.showInputDialog("請(qǐng)輸入要?jiǎng)h除的學(xué)生號(hào)姓名");
     if(input1.equals("")||input2.equals(""))
     {
       JOptionPane.showMessageDialog(null, "你必須輸入學(xué)號(hào)和姓名才能刪除");
     }else{
       Jdbcconn conn = new Jdbcconn();
//連接數(shù)據(jù)庫
       try {
         conn.OpenConn("student", "sa", "yaya");
         String strSQL = "delete from base_info where id='" + input1 +
             "' and name='" + input2 + "'";
         conn.executeUpdate(strSQL);
         queryDataSet1.refresh();
         JOptionPane.showMessageDialog(null, "刪除成功");

         //System.out.println("name");
       }
       catch (Exception ex) {
         System.out.println(ex.getMessage());
         JOptionPane.showMessageDialog(null, "數(shù)據(jù)庫沒有鏈接成功,數(shù)據(jù)沒有修改成功!");
       } //end catch
     }
  }



}//end class

class Student_Information_jButton4_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jButton4_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jButton4_actionPerformed(e);
  }
}

class Student_Information_jButton3_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jButton3_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jButton3_actionPerformed(e);
  }
}

class Student_Information_jButton5_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jButton5_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jButton5_actionPerformed(e);
  }
}

class Student_Information_jdbTextField4_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jdbTextField4_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jdbTextField4_actionPerformed(e);
  }
}

class Student_Information_jButton2_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jButton2_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent actionEvent) {
    adaptee.jButton2_actionPerformed(actionEvent);
  }
}

class Student_Information_jButton1_actionAdapter
    implements ActionListener {
  private Student_Information adaptee;
  Student_Information_jButton1_actionAdapter(Student_Information adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jButton1_actionPerformed(e);
  }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美韩日一区二区三区| 亚洲美女精品一区| 色综合久久天天综合网| 日韩电影在线观看网站| 中文字幕一区二区三区蜜月| 欧美性感一类影片在线播放| 国产91精品久久久久久久网曝门| 一区二区成人在线| 久久精品欧美日韩| 制服丝袜在线91| bt欧美亚洲午夜电影天堂| 日本午夜精品一区二区三区电影 | 国产精品系列在线播放| 一区二区国产视频| 欧美国产精品一区| 精品国产伦一区二区三区免费| 一本色道综合亚洲| 国产99一区视频免费| 蜜桃视频一区二区| 亚洲成a人片在线观看中文| 国产精品国产馆在线真实露脸 | 自拍偷拍国产亚洲| 国产亚洲综合av| 日韩午夜在线观看视频| 欧美日韩情趣电影| 欧洲国内综合视频| 91免费版pro下载短视频| 国产精品自在欧美一区| 久久丁香综合五月国产三级网站| 午夜视频在线观看一区二区三区| 亚洲另类一区二区| 中文字幕在线一区免费| 国产欧美日韩视频在线观看| 欧美精品一区二区三区视频| 日韩一区二区影院| 欧美日韩亚洲综合一区二区三区| 色噜噜偷拍精品综合在线| 成人激情小说乱人伦| 国产+成+人+亚洲欧洲自线| 国内外成人在线| 另类小说图片综合网| 日韩综合小视频| 日韩在线一区二区| 首页国产丝袜综合| 丝袜亚洲精品中文字幕一区| 午夜精品国产更新| 日日噜噜夜夜狠狠视频欧美人| 婷婷久久综合九色国产成人 | 狠狠色综合日日| 精品一区二区三区日韩| 久久狠狠亚洲综合| 久久99精品国产麻豆婷婷| 美女www一区二区| 狠狠色丁香九九婷婷综合五月| 久久91精品久久久久久秒播| 久久国产人妖系列| 国产在线不卡一卡二卡三卡四卡| 国产一区二区精品久久91| 国产精一区二区三区| 国产精品18久久久久久vr| 粉嫩蜜臀av国产精品网站| 99热在这里有精品免费| 91久久国产最好的精华液| 欧美亚洲国产一卡| 日韩一区二区影院| 久久久久久黄色| 亚洲男人的天堂av| 亚洲国产精品久久久男人的天堂| 秋霞影院一区二区| 国产精品中文字幕日韩精品 | 欧美剧情电影在线观看完整版免费励志电影 | 欧美日韩高清一区二区三区| 欧美精品 国产精品| 26uuu成人网一区二区三区| 亚洲国产精品国自产拍av| 亚洲天堂2014| 日韩电影一区二区三区| 国产精品69毛片高清亚洲| 色综合久久久久综合体| 日韩欧美在线影院| 中文字幕在线视频一区| 午夜精品一区二区三区免费视频| 黄色小说综合网站| 在线精品视频小说1| 欧美不卡一区二区| 亚洲色图第一区| 精品一区二区三区视频在线观看 | 亚洲大片免费看| 国内精品免费**视频| 色菇凉天天综合网| 精品成人私密视频| 一区二区三区小说| 激情久久五月天| 欧美性大战久久| 国产欧美日韩精品a在线观看| 亚洲国产欧美在线人成| 国模娜娜一区二区三区| 91福利在线播放| 久久久精品国产99久久精品芒果| 亚洲成人免费在线观看| 欧美亚洲日本一区| 欧美国产成人精品| 日韩成人精品在线| 一本久久a久久免费精品不卡| 26uuu久久综合| 日本不卡免费在线视频| 色综合久久中文字幕综合网 | 亚洲欧美色一区| 国产麻豆精品theporn| 欧美三级在线播放| 国产精品不卡一区| 国产福利精品导航| 欧美一个色资源| 亚洲成人精品一区| 91在线免费视频观看| 久久一区二区三区四区| 五月婷婷综合在线| 欧美亚洲日本一区| 亚洲精品美国一| 成人黄页在线观看| 欧美国产视频在线| 国内一区二区视频| 精品久久久久99| 免费在线视频一区| 91精品欧美综合在线观看最新| 亚洲国产欧美在线人成| 在线观看免费亚洲| 亚洲女同ⅹxx女同tv| 91偷拍与自偷拍精品| 亚洲天堂网中文字| 99久久综合色| 中文字幕一区日韩精品欧美| 懂色av一区二区夜夜嗨| 亚洲国产精品精华液ab| 成人晚上爱看视频| 国产精品视频一二三区| 国产经典欧美精品| 中文字幕av一区二区三区高 | 精品国产凹凸成av人导航| 亚洲成人av中文| 一道本成人在线| 中文字幕一区av| 国产综合色视频| 国产日产亚洲精品系列| 韩国一区二区在线观看| 日韩午夜激情av| 青青草国产精品亚洲专区无| 欧美日韩精品电影| **欧美大码日韩| 91一区二区三区在线观看| 国产欧美一区二区三区鸳鸯浴| 国产一区二区影院| 久久久青草青青国产亚洲免观| 蜜桃精品视频在线观看| 欧美精品久久久久久久久老牛影院 | 欧美一区二区在线视频| 亚洲一二三区在线观看| 欧美影视一区在线| 亚洲成人综合网站| 正在播放亚洲一区| 亚洲女同一区二区| 欧美日本不卡视频| 久久精工是国产品牌吗| 欧美精品一区视频| 国产成人免费在线观看不卡| 国产片一区二区| 91丨porny丨国产| 亚洲精品一二三| 欧美日韩中文一区| 亚洲国产一区二区三区青草影视| 欧美日韩一二区| 九九国产精品视频| 久久久久国产一区二区三区四区 | 久久精品日韩一区二区三区| 国产精品538一区二区在线| 国产精品欧美经典| 色欧美日韩亚洲| 免费观看一级特黄欧美大片| 精品国产一区a| 国产91精品一区二区麻豆亚洲| 亚洲视频一区在线| 欧美日韩久久一区二区| 国产传媒一区在线| 亚洲天堂网中文字| 91久久精品国产91性色tv| 日本不卡一区二区三区高清视频| 2021中文字幕一区亚洲| 色综合久久中文字幕综合网 | 久久综合色一综合色88| 成人午夜电影久久影院| 亚洲一区二区五区| 欧美精三区欧美精三区| 精品一区二区三区在线播放| 日韩一区在线看| 久久综合久久综合九色| 91免费视频大全| 久久66热偷产精品| 亚洲永久免费视频| 久久久久国产一区二区三区四区| 日本韩国欧美三级|