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

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

?? c0779f19b454001c1be0bd331aee9eca

?? 這是一個(gè)用java編寫(xiě)的學(xué)生成績(jī)管理系統(tǒng)
??
字號(hào):

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.sql.*;

public class GuanLi extends JFrame implements ActionListener {

	String xm;

	int i, j, xh, yy, gs, wl, zt;

	JLabel prompt1 = new JLabel("學(xué)生成績(jī)管理系統(tǒng)");
	JLabel prompt2 = new JLabel("			用戶:");
	JLabel prompt3 = new JLabel("			密碼:");
	JLabel prompt4 = new JLabel("			姓名:");
	JLabel prompt5 = new JLabel("			學(xué)號(hào):");
	JLabel prompt6 = new JLabel("			高等數(shù)學(xué):");
	JLabel prompt7 = new JLabel("			大學(xué)英語(yǔ):");
	JLabel prompt8 = new JLabel("			大學(xué)物理:");
	JLabel prompt9 = new JLabel("			機(jī)械制圖:");

	JTextField input1 = new JTextField(8);
	JTextField input2 = new JTextField(8);
	JTextField input3 = new JTextField(8);
	JTextField input4 = new JTextField(8);
	JTextField input5 = new JTextField(8);
	JTextField input6 = new JTextField(8);
	JTextField input7 = new JTextField(8);
	JTextField input8 = new JTextField(8);
	JButton btn1 = new JButton("登錄");
	JButton btn2 = new JButton("增加記錄");
	JButton btn3 = new JButton("修改記錄");
	JButton btn4 = new JButton("刪除記錄");
	JButton btn5 = new JButton("學(xué)生查詢");

	public GuanLi() {

		getContentPane().setLayout(new GridLayout(10, 2));

		getContentPane().add(new JLabel());
		getContentPane().add(prompt1);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt2);
		getContentPane().add(input1);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt3);
		getContentPane().add(input2);
		getContentPane().add(btn1);

		getContentPane().add(prompt4);
		getContentPane().add(input3);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt5);
		getContentPane().add(input4);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt6);
		getContentPane().add(input5);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt7);
		getContentPane().add(input6);

		getContentPane().add(new JLabel());
		getContentPane().add(prompt8);
		getContentPane().add(input7);
		getContentPane().add(new JLabel());
		getContentPane().add(prompt9);
		getContentPane().add(input8);
		getContentPane().add(btn5);
		getContentPane().add(btn2);
		getContentPane().add(btn3);
		getContentPane().add(btn4);

		prompt6.setVisible(false);
		prompt7.setVisible(false);
		prompt8.setVisible(false);
		prompt9.setVisible(false);
		input5.setVisible(false);
		input6.setVisible(false);
		input7.setVisible(false);
		input8.setVisible(false);
		btn2.setVisible(false);
		btn3.setVisible(false);
		btn4.setVisible(false);
		btn1.addActionListener(this);
		btn2.addActionListener(this);
		btn3.addActionListener(this);
		btn4.addActionListener(this);
		btn5.addActionListener(this);
	}

	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand() == "登錄") {
			String a, b;
			a = input1.getText();
			b = input2.getText();
			input1.setText("");
			if ((a.equals("zhaoweihua") == true)
					&& (b.equals("123456") == true)) {
				try {
					Connection con = DBConnection.getConncetion();
					con.close();
				} catch (SQLException ex) {
					System.out.println(ex.toString());
					System.out.println("Error!!");
				} catch (java.lang.Exception ex) {
					ex.printStackTrace();
				}

				prompt4.setVisible(true);
				prompt5.setVisible(true);
				prompt6.setVisible(true);
				prompt7.setVisible(true);
				btn5.setLabel("用戶查詢");

				prompt8.setVisible(true);
				prompt9.setVisible(true);
				input3.setVisible(true);
				input4.setVisible(true);
				input5.setVisible(true);
				input6.setVisible(true);
				input7.setVisible(true);
				input8.setVisible(true);
				btn2.setVisible(true);
				btn3.setVisible(true);
				btn4.setVisible(true);

				btn1.setVisible(false);
				input1.setText("登錄成功");
				input2.setText("");
				input1.selectAll();
			} else
				input2.setText("用戶名或密碼錯(cuò)");
		}
		if (e.getActionCommand() == "增加記錄") {
			boolean scucss = true;
			try {
				xm = input3.getText();
				xh = Integer.parseInt(input4.getText());

				yy = Integer.parseInt(input6.getText());
				gs = Integer.parseInt(input5.getText());
				wl = Integer.parseInt(input7.getText());
				zt = Integer.parseInt(input8.getText());
				Connection con = DBConnection.getConncetion();
				Statement stmt = con.createStatement();
				stmt.executeUpdate("INSERT INTO chengjiguanli VALUES('" + xm+ "'," + xh + "," + gs + "," + yy + "," + wl + "," + zt+ ")");
				
				stmt.close();
				con.close();
				input1.setText("增加成功");
				input2.setText("");
				input3.setText("");
				input4.setText("");
				input5.setText("");
				input6.setText("");
				input7.setText("");
				input8.setText("");
				
			} catch (SQLException ex) {
				System.out.println(ex.toString());
				System.out.println("Error!!");
			} catch (java.lang.Exception ex) {
				ex.printStackTrace();
			}

			try {
				XingMing();
			} catch (EmptyException as) {
				input3.setText("姓名不能為空");
				scucss = false;
			}
			try {
				xh = Integer.parseInt(input4.getText());
			} catch (NumberFormatException m) {
				input4.setText("學(xué)號(hào)為空或格式錯(cuò)");
				scucss = false;
			}

			try {
				YY();
			} catch (EmptyException as) {
				yy = -1;
			} catch (OverException dd) {
				input6.setText("應(yīng)在0-100間");
				scucss = false;
			} catch (NumberFormatException cm) {
				input6.setText("成績(jī)應(yīng)為數(shù)據(jù)");
				scucss = false;
			}
			try {
				GS();
			} catch (EmptyException as) {
				gs = -1;
			} catch (OverException dd) {
				input5.setText("應(yīng)在0-100間");
				scucss = false;
			} catch (NumberFormatException cm) {
				input5.setText("成績(jī)應(yīng)為數(shù)據(jù)");
				scucss = false;
			}
			try {
				WL();
			} catch (EmptyException as) {
				wl = -1;
			} catch (OverException dd) {
				input7.setText("應(yīng)在0-100間");
				scucss = false;
			} catch (NumberFormatException cm) {
				input7.setText("成績(jī)應(yīng)為數(shù)據(jù)");
				scucss = false;
			}
			try {
				ZT();
			} catch (EmptyException as) {
				zt = -1;
			} catch (OverException dd) {
				input8.setText("應(yīng)在0-100間");
				scucss = false;
			} catch (NumberFormatException cm) {
				input8.setText("成績(jī)應(yīng)為數(shù)據(jù)");
				scucss = false;
			}
			if (scucss == true) {

			}
		}
		if (e.getActionCommand() == "修改記錄")

		{
			try {
				xm = input3.getText();
				xh = Integer.parseInt(input4.getText());

				yy = Integer.parseInt(input6.getText());
				gs = Integer.parseInt(input5.getText());
				wl = Integer.parseInt(input7.getText());
				zt = Integer.parseInt(input8.getText());
				Connection con = DBConnection.getConncetion();
				Statement stmt = con.createStatement();
				stmt.executeUpdate("UPDATE chengjiguanli SET Math=" + gs+ ",English=" + yy + ",Physical=" + wl + ",Draw=" + zt+ " WHERE Sname='" + xm + "' AND Sno=" + xh + "");
				
				stmt.close();
				con.close();
				input1.setText("修改成功");
				input2.setText("");
				input3.setText("");
				input4.setText("");
				input5.setText("");
				input6.setText("");
				input7.setText("");
				input8.setText("");
			}

			catch (SQLException ex) {
				System.out.println(ex.toString());
				System.out.println("Error!!");
			} catch (java.lang.Exception ex) {
				ex.printStackTrace();
			}

		}
		if (e.getActionCommand() == "刪除記錄") {
			try {
				xm = input3.getText();
				xh = Integer.parseInt(input4.getText());
				Connection con = DBConnection.getConncetion();
				Statement stmt = con.createStatement();
				stmt.executeUpdate("DELETE FROM chengjiguanli WHERE Sname='"+xm+"'AND Sno=" + xh + "");
			
				stmt.close();
				con.close();

				input1.setText("刪除成功");
				input2.setText("");
				input3.setText("");
				input4.setText("");
				input5.setText("");
				input6.setText("");
				input7.setText("");
				input8.setText("");
			} catch (SQLException ex) {
				System.out.println(ex.toString());
				System.out.println("Error!!");
			} catch (java.lang.Exception ex) {
				ex.printStackTrace();
			}
			// StuInf.removeElementAt(mid);

		}
		if (e.getActionCommand() == "用戶查詢") {
			boolean right = true;
			try {
				xh = Integer.parseInt(input4.getText());
			} catch (NumberFormatException m) {
				input4.setText("學(xué)號(hào)為空或格式錯(cuò)");
				right = false;
			}
			if (right == true) {
				try {

					xh = Integer.parseInt(input4.getText());
					Connection con = DBConnection.getConncetion();
					Statement stmt = con.createStatement();

					ResultSet rs = stmt
							.executeQuery("SELECT * FROM chengjiguanli WHERE Sno="+ xh + "");
					rs.next();
					String i = rs.getString(1);
					
					String j = rs.getString(3);
					String k = rs.getString(4);
					String m = rs.getString(5);
					String n = rs.getString(6);
					input3.setText(i);
					
					input5.setText(j);
					input6.setText(k);
					input7.setText(m);
					input8.setText(n);
					String a=rs.getString("Sno");
					con.close();
					stmt.close();
					rs.close();
				} catch (SQLException ex) {
					System.out.println("沒(méi)有找到相關(guān)記錄");
					System.out.println(ex.toString());
					System.out.println("Error!!");
				} 
				
			
				catch (java.lang.Exception ex) {
					ex.printStackTrace();
				}


				btn3.setEnabled(true);
				btn4.setEnabled(true);
			}
		}
		if (e.getActionCommand() == "學(xué)生查詢") {
			boolean right = true;
			prompt2.setVisible(false);
			prompt3.setVisible(false);
			prompt6.setVisible(true);
			prompt7.setVisible(true);
			prompt8.setVisible(true);
			prompt9.setVisible(true);
			btn1.setVisible(false);
			btn2.setVisible(false);
			btn3.setVisible(false);
			btn4.setVisible(false);
			input1.setVisible(false);
			input2.setVisible(false);
			input5.setVisible(true);
			input6.setVisible(true);
			input7.setVisible(true);
			input8.setVisible(true);
			try {
				xh = Integer.parseInt(input4.getText());
			} catch (NumberFormatException m) {
				input4.setText("學(xué)號(hào)為空或格式錯(cuò)");
				right = false;
			}
			if (right == true) {
				try {
					xh = Integer.parseInt(input4.getText());
					Connection con = DBConnection.getConncetion();
					Statement stmt = con.createStatement();

					ResultSet rs = stmt.executeQuery("SELECT * FROM chengjiguanli WHERE Sno="+ xh + "");
                    rs.next();
					String i = rs.getString(1);
					
					String j = rs.getString(3);
					String k = rs.getString(4);
					String m = rs.getString(5);
					String n = rs.getString(6);
					input3.setText(i);
					
					input5.setText(j);
					input6.setText(k);
					input7.setText(m);
					input8.setText(n);
					String a=rs.getString("Sno");
					con.close();
					stmt.close();
					rs.close();
				} catch (SQLException ex) {
					System.out.println("沒(méi)有找到相關(guān)記錄");
					System.out.println(ex.toString());
					
					System.out.println("Error!!");
				} catch (java.lang.Exception ex) {
					ex.printStackTrace();
				}

				btn3.setEnabled(true);
				btn4.setEnabled(true);
			}
		}

	}

	// 異常類
	class OverException extends Exception {
		String over;
	}

	class EmptyException extends Exception {
		String empty;
	}

	void XingMing() throws EmptyException {
		if ((input3.getText()).equals(""))
			throw (new EmptyException());
		else
			xm = input3.getText();

	}

	void YY() throws OverException, EmptyException {
		if ((input6.getText()).equals(""))
			throw (new EmptyException());
		else
			yy = Integer.parseInt(input6.getText());
		if (yy < 0 || yy > 100)
			throw (new OverException());
	}

	void WL() throws OverException, EmptyException {
		if ((input7.getText()).equals(""))
			throw (new EmptyException());
		else
			wl = Integer.parseInt(input7.getText());
		if (wl < 0 || wl > 100)
			throw (new OverException());
	}

	void ZT() throws OverException, EmptyException {
		if ((input8.getText()).equals(""))
			throw (new EmptyException());
		else
			zt = Integer.parseInt(input8.getText());
		if (zt < 0 || zt > 100)
			throw (new OverException());
	}

	void GS() throws OverException, EmptyException {
		if ((input5.getText()).equals(""))
			throw (new EmptyException());
		else
			gs = Integer.parseInt(input5.getText());
		if (gs < 0 || gs > 100)
			throw (new OverException());
	}

	public static void main(String[] args) {
		GuanLi frame = new GuanLi();
		frame.setTitle("歡迎登錄學(xué)生成績(jī)管理系統(tǒng)");
		frame.setSize(800, 600);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产欧美日韩| 亚洲丝袜制服诱惑| 欧美一二三区精品| 欧美一区二区视频在线观看2022| 欧美日韩一二三区| 欧美三级欧美一级| 欧美日韩在线精品一区二区三区激情| 91丝袜国产在线播放| 91麻豆免费观看| 欧美中文字幕一二三区视频| 欧亚洲嫩模精品一区三区| 欧美日韩一区三区| 91精品国产一区二区三区蜜臀| 欧美一卡二卡在线| 久久亚洲免费视频| 国产精品五月天| 亚洲色图.com| 亚洲国产精品久久一线不卡| 午夜在线成人av| 免费观看在线色综合| 国内外成人在线视频| 成人免费视频免费观看| 91小视频在线| 欧美人伦禁忌dvd放荡欲情| 日韩午夜av电影| wwww国产精品欧美| 中文字幕一区二区三区视频| 一区二区三区四区亚洲| 午夜精品久久久久久久久| 蜜臀99久久精品久久久久久软件| 国产综合成人久久大片91| 国产1区2区3区精品美女| 91首页免费视频| 911精品国产一区二区在线| 精品国产一区二区三区忘忧草| 国产视频视频一区| 一区二区三区在线视频播放| 日韩中文欧美在线| 国产成人综合自拍| 欧美制服丝袜第一页| 日韩一级大片在线| 国产精品第一页第二页第三页| 亚洲午夜精品网| 国产毛片精品国产一区二区三区| 99久久久久久| 日韩欧美在线综合网| 国产精品美女久久久久久久| 亚洲成av人片在线| 国产成人av资源| 精品视频资源站| 国产亚洲精久久久久久| 亚洲丰满少妇videoshd| 国产精品亚洲专一区二区三区| 91捆绑美女网站| 欧美mv日韩mv国产| 亚洲免费视频成人| 国内精品第一页| 欧美日韩成人激情| 国产精品乱码一区二三区小蝌蚪| 日韩精品视频网| 99这里只有久久精品视频| 日韩欧美一级二级三级久久久| 椎名由奈av一区二区三区| 久久精品72免费观看| 91色|porny| 久久综合九色综合久久久精品综合| 亚洲精品免费一二三区| 国产精品91一区二区| 欧美日韩在线不卡| 亚洲美女少妇撒尿| 国产成人在线视频网址| 91精品国产综合久久精品麻豆| 中文字幕亚洲欧美在线不卡| 国产中文字幕一区| 69久久99精品久久久久婷婷| 国产精品国产三级国产aⅴ中文 | 精品粉嫩超白一线天av| 亚洲图片欧美一区| 91在线视频18| 国产欧美日韩激情| 精品一区二区三区av| 7878成人国产在线观看| 一区二区三区免费在线观看| 成人av在线资源网| 久久精品男人的天堂| 久久精品国产99| 日韩一区二区在线看片| 午夜影院在线观看欧美| 欧美在线视频你懂得| 亚洲欧美日韩精品久久久久| 丁香亚洲综合激情啪啪综合| 久久久美女艺术照精彩视频福利播放| 偷拍与自拍一区| 欧美日韩一区二区三区在线| 亚洲欧美一区二区三区孕妇| 成人性生交大片免费看中文网站| xnxx国产精品| 精品一区二区免费在线观看| 欧美一二三四在线| 麻豆国产精品777777在线| 国产调教视频一区| 国产成人免费av在线| 国产亚洲婷婷免费| 国产黑丝在线一区二区三区| 国产欧美视频在线观看| 国产成人在线视频播放| 中文字幕不卡一区| 成人av在线资源| 亚洲桃色在线一区| 91九色最新地址| 一区二区三区美女| 欧美日韩在线播| 日日嗨av一区二区三区四区| 欧美日本国产视频| 奇米精品一区二区三区四区 | 一区二区三区蜜桃| 欧美日韩一区国产| 美女国产一区二区三区| 精品99一区二区三区| 国产剧情在线观看一区二区| 国产亚洲精品久| 色综合中文字幕国产 | 韩国视频一区二区| 国产视频一区二区在线| 99精品久久免费看蜜臀剧情介绍| 亚洲人123区| 91精品中文字幕一区二区三区| 久久99精品一区二区三区 | 美洲天堂一区二卡三卡四卡视频| 精品久久久久久无| 成人动漫视频在线| 亚洲亚洲精品在线观看| 日韩视频一区在线观看| 国产成人免费在线观看| 亚洲女同一区二区| 91精品国产免费| 风间由美一区二区av101| 一区二区三区中文字幕| 日韩一区二区三区四区五区六区| 国产成人午夜99999| 亚洲宅男天堂在线观看无病毒| 91精品国产入口在线| 国产99久久久精品| 亚洲成人免费电影| 久久久精品中文字幕麻豆发布| 91年精品国产| 看电视剧不卡顿的网站| 国产精品久久久久婷婷| 欧美久久一二三四区| 国产美女一区二区三区| 一区二区三区在线视频免费| 日韩一区二区三区免费看| 成人激情免费网站| 日韩国产成人精品| 中文字幕视频一区二区三区久| 555夜色666亚洲国产免| 成人国产亚洲欧美成人综合网 | 美女mm1313爽爽久久久蜜臀| 中文字幕第一区| 日韩午夜激情免费电影| 色婷婷综合激情| 国产成人无遮挡在线视频| 丝袜a∨在线一区二区三区不卡| 亚洲国产精品传媒在线观看| 欧美精品第一页| 91麻豆免费观看| 国产精品一品二品| 日本中文一区二区三区| 亚洲特黄一级片| 久久久久久99精品| 4438成人网| 色偷偷久久一区二区三区| 国产一区二区看久久| 日韩在线卡一卡二| 亚洲精品免费电影| 国产精品无人区| 久久综合成人精品亚洲另类欧美| 欧美视频在线一区二区三区| 成人美女在线观看| 国产美女在线精品| 免费在线看成人av| 亚洲国产美国国产综合一区二区 | 精彩视频一区二区| 婷婷久久综合九色综合绿巨人| 亚洲同性gay激情无套| 国产亚洲短视频| 精品精品国产高清a毛片牛牛| 欧美日韩成人综合在线一区二区| 99国产精品99久久久久久| 国产成人免费在线| 国产乱码精品一区二区三区忘忧草| 日韩在线播放一区二区| 午夜av电影一区| 亚洲成人av一区| 亚洲成人黄色影院| 一区二区三区成人在线视频| 1024国产精品| 最新热久久免费视频| 1024精品合集| 亚洲视频精选在线|