freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

學(xué)生信息管理系統(tǒng)(java)代碼-文庫(kù)吧

2024-11-25 13:57 本頁(yè)面


【正文】 + kch + 39。)。 } catch (SQLException e) { ()。 } } String str = insert into c values(39。 + kch + 39。,39。 + kcm + 39。,39。 + xxkch + 39。)。 ()。// 連接數(shù)據(jù)庫(kù) try { (str)。 (null, () + 成功! , 提示 , , new ImageIcon( ))。 (false)。 } catch (SQLException e) { (null, 課程號(hào)已存在! )。 ()。 } } public void actionPerformed(ActionEvent e) { if (() == 確定 ) { ()。 if (isNewsm) { new CM(課程信息管理 ).display()。 } isNewsm = true。 } if (() == 取消 ) { (false)。 new CM(課程信息管理 ).display()。 } } } import 。 import 。 import .*。 import .*。 import .*。 import .*。 import 。 class CM extends JFrame implements ActionListener {// 課程信息管理 JPanel p = new JPanel()。 JButton btnAdd = new JButton(增加 )。 JButton btnDelete = new JButton(刪除 )。 JButton btnAlter = new JButton(修改 )。 JButton btnSearch = new JButton(查詢(xún) )。 JButton btnDisplay = new JButton(顯示 )。 JMenuBar mb = new JMenuBar()。 JPanel p1 = new JPanel()。 JTable sTable。 JScrollPane scroll。 Connection con = null。 Statement stmt = null。 ResultSet rs = null。 Object[][] playerInfo。 CSelect cst。 String mkch = null。 boolean bstd = false。 CM(String title) {// 構(gòu)造方法 super(title)。 add(South, p)。 (Center, p1)。 (btnAdd)。 (btnDelete)。 (btnAlter)。 (btnSearch)。 (btnDisplay)。 ()。// 連接數(shù)據(jù)庫(kù) (200, 200, 400, 260)。 (this)。 (this)。 (this)。 (this)。 (this)。 (mb)。 // ()。 (false)。 show()。 } CM(CSelect cst, String title) {// 構(gòu)造方法 super(title)。 = cst。 bstd = true。 add(South, p)。 (Center, p1)。 (btnAdd)。 (btnDelete)。 (btnAlter)。 (btnSearch)。 (btnDisplay)。 ()。 (200, 200, 400, 260)。 (this)。 (this)。 (this)。 (this)。 (this)。 (mb)。 // ()。 (false)。 show()。 } public void display() {// 顯示所有的課程信息 int i = 0。 int j = 0。 int k = 0。 List al = new ArrayList()。 try { rs = (select * from c)。 while (()) {// 找出表中的記錄數(shù)賦給 i ((o))。 (())。 ((po))。 i++。 } } catch (SQLException e) { ()。 } playerInfo = new Object[i][3]。 String[] columnNames = { 課程號(hào) , 課程名 , 先行課程號(hào) }。 try { rs = (select * from c order by o)。 while (()) { playerInfo[j][0] = (o)。 playerInfo[j][1] = ()。 playerInfo[j][2] = (po)。 j++。 } } catch (SQLException e) { ()。 } sTable = new JTable(playerInfo, columnNames)。// 創(chuàng)建網(wǎng)格 (sTable)。 scroll = new JScrollPane(sTable)。 (scroll)。 } public void connDB() { // 連接數(shù)據(jù)庫(kù) try { ()。 } catch (ClassNotFoundException e) { ()。 } try { con = ( jdbc: DatabaseName=student, sa, 123)。 stmt = ()。 } catch (SQLException e) { ()。 } } public void closeDB() // 關(guān)閉連接 { try { ()。 ()。 } catch (SQLException e) { ()。 } } public void delete() {// 刪除某個(gè)課程信息 String kch = null。 String kcm = null。 String xxkch = null。 int row = 1。 row = ()。 if (row == 1) {// 判斷要?jiǎng)h除的信息是否被選中 (null, 請(qǐng)選擇要?jiǎng)h除的記錄! )。 } else { if (!bstd) {// 判斷選擇的是不是查詢(xún)后的結(jié)果 int j1 = 0。 try { rs = (select * from c)。 while (() amp。amp。 j1 = row) {// 找出當(dāng)前被選中的記錄在 數(shù)據(jù)庫(kù)中的對(duì)應(yīng) kch = (o)。 kcm = ()。 xxkch = (po)。 j1++。 } } catch (SQLException e) { ()。 } int i1 = 0。 try { int rs1 = (delete from c where o=39。 + kch + 39。)。// 刪除數(shù)據(jù)庫(kù)中當(dāng)前被選中的記錄 (null, 記錄刪除成功! )。 ()。 new CM(課程信息管理 ).display()。 } catch (SQLException e) { ()。 } } else { try { int rs1 = (delete from c where o=39。 + mkch + 39。)。// 刪除數(shù)據(jù)庫(kù)中當(dāng)前被選中的記錄 (null, 記錄刪除成功! )。 ()。 new CM(課程信息管理 ).display()。 } catch (SQLException e) { ()。 } } } } public void update() {// 修改某個(gè)課程記錄 String kch = null。 String kcm = null。 String xxkch = null。 int row = 1。 row = ()。 if (row == 1) { (null, 請(qǐng)選擇要修改的記錄! )。 } else {
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1