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

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

?? bank.java

?? 簡易的銀行卡管理系統
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
class denglu extends Frame implements ActionListener
{
	Connection con;
	Statement sql;
	ResultSet r1,r2;
	TextField text1;
	TextField text2;
	Button enter;
	Button quit;
	Label number;
	Label password;
	Label biaoyu;
	Checkbox controller;
	Checkbox user;
	CheckboxGroup leixing;
	denglu()
	{
		super("用戶登錄");
		setBounds(320,200,320,200);
		addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent e)
			{
				System.exit(0);
			}
		});
		leixing=new CheckboxGroup();
		controller=new Checkbox("管理員",true,leixing);
		user=new Checkbox("普通用戶",false,leixing);
		text1=new TextField(15);
		text2=new TextField(15);
		text2.setEchoChar('*');
		text1.setBackground(Color.pink);
		text2.setBackground(Color.pink);
		number=new Label("帳號",Label.CENTER);
		password=new Label("密碼",Label.CENTER);
		biaoyu=new Label("歡迎使用銀行卡管理系統",Label.CENTER);
		enter=new Button("登錄");
		quit=new Button("退出");
		enter.setBackground(Color.pink);
		quit.setBackground(Color.pink);
		enter.addActionListener(this);
		quit.addActionListener(this);
		Panel p=new Panel();
		p.setBackground(Color.pink);
		p.setLayout(null);
		p.add(biaoyu);biaoyu.setBounds(80,10,150,20);
		p.add(number);number.setBounds(60,40,30,20);
		p.add(text1);text1.setBounds(100,40,150,20);
		p.add(password);password.setBounds(60,70,30,20);
		p.add(text2);text2.setBounds(100,70,150,20);
		p.add(controller);controller.setBounds(80,100,50,20);
		p.add(user);user.setBounds(160,100,80,20);
		p.add(enter);enter.setBounds(80,130,45,20);
		p.add(quit);quit.setBounds(180,130,45,20);
		add(p);
		setVisible(true);
		setResizable(false);
	}
	public void actionPerformed(ActionEvent e)
	{
		String s1,s2;
		boolean b1=false;
		if(e.getSource()==quit)
		{
			System.exit(0);
		}
		else if(e.getSource()==enter && user.getState()==true)
		{
			try
			{
				con=DriverManager.getConnection("jdbc:odbc:superman","iceman","1986925");
			    sql=con.createStatement();
			    r1=sql.executeQuery("SELECT * FROM user");
			    while((b1=r1.next())==true)
			    {
			    	s1=r1.getString("counts");
			    	if(s1.equals(text1.getText().trim()))
			    	{
			    		String i=r1.getString("report");
			    		if(i.equals("1"))
			    		{
			    			s2=r1.getString("password");
			    			if(s2.equals(text2.getText().trim()))
			    		    {
			    		    	dispose();
			    			    use yonghu=new use(s1);
			    			    con.close();
			    			}
			    			else
			    			{
			    				JOptionPane.showMessageDialog(this,"對不起,密碼不正確!","提示",JOptionPane.ERROR_MESSAGE);
			    			    text2.setText(null);
			    			    con.close();
			    		    }
			    		}
			    		else
			    		{
			    			JOptionPane.showMessageDialog(this,"對不起,此帳號已經掛失!","提示",JOptionPane.ERROR_MESSAGE);
			    			text1.setText(null);
			    			con.close();
			    		}
			    	}
			    }
			    if(b1==false)
			    {
			    	JOptionPane.showMessageDialog(this,"對不起,帳號不正確!","提示",JOptionPane.ERROR_MESSAGE);
			    	text1.setText(null);
			    	con.close();
			    }
			}
			catch(SQLException e3)
			{
			}
		}
		else if(e.getSource()==enter && controller.getState()==true)
		{
			try
			{
				con=DriverManager.getConnection("jdbc:odbc:superman","iceman","1986925");
			    sql=con.createStatement();
			    r2=sql.executeQuery("SELECT * FROM controller");
			    while((b1=r2.next())==true)
			    {
			    	s1=r2.getString("counts");
			    	if(s1.equals(text1.getText().trim()))
			    	{
			    		s2=r2.getString("password");
			    		if(s2.equals(text2.getText().trim()))
			    		{
			    			dispose();
			    			control guanli=new control();
			    			con.close();
			    		}
			    		else
			    		{
			    			JOptionPane.showMessageDialog(this,"對不起,密碼不正確!","提示",JOptionPane.ERROR_MESSAGE);
			    			text2.setText(null);
			    			con.close();
			    		}
			    	}	
			    }
			    if(b1==false)
			    {
			    	JOptionPane.showMessageDialog(this,"對不起,帳號不正確!","提示",JOptionPane.ERROR_MESSAGE);
			    	text1.setText(null);
			    	con.close();
			    }
			}
			catch(SQLException e2)
			{
			}
		}
	}
}
class use extends Frame implements ActionListener
{
	Connection con;
	Statement sql;
	ResultSet r;
	Button quqian;Button zhuanzhang;Button gaimi;
	Button chaxun;Button fanhui;Button quit;
	TextField text,text1,text2,text3,text4,text5,text6,text7,text8,text9;
	Button enter,cancel,button1,button2,button3,button4;
	Panel p,p1,p2,p3,p4,p5;
	CardLayout card;
	String acount;
	use(String s)
	{
		super("普通用戶");
		setLayout(null);
		setBounds(450,250,450,250);
		setBackground(Color.pink);
		addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent e)
			{
				dispose();
			}
		});
		acount=s;
		quqian=new Button("取錢");
		zhuanzhang=new Button("轉帳");
		gaimi=new Button("修改密碼");
		chaxun=new Button("查詢帳戶");
		fanhui=new Button("返回");
		quit=new Button("退出");
		quqian.addActionListener(this);
		zhuanzhang.addActionListener(this);
		gaimi.addActionListener(this);
		chaxun.addActionListener(this);
		fanhui.addActionListener(this);
		quit.addActionListener(this);
		p=new Panel();p1=new Panel();p2=new Panel();
		p3=new Panel();p4=new Panel();p5=new Panel();
		add(quqian);quqian.setBounds(15,65,60,30);
		add(chaxun);chaxun.setBounds(15,120,60,30);
		add(fanhui);fanhui.setBounds(15,175,60,30);
		add(zhuanzhang);zhuanzhang.setBounds(375,65,60,30);
		add(gaimi);gaimi.setBounds(375,120,60,30);
	    add(quit);quit.setBounds(375,175,60,30);
	    card=new CardLayout();
	    p.setLayout(card);
	    p1.add(new Label("請選擇相應的操作!",Label.CENTER));
	    p2.setLayout(null);
	    Label zhuyi=new Label("注意:取款金額必須為整數",Label.CENTER);
	    p2.add(zhuyi);zhuyi.setBounds(50,20,150,20);
	    Label jine=new Label("請輸入取款金額",Label.CENTER);
	    p2.add(jine);jine.setBounds(10,50,100,20);
	    text=new TextField(15);text.setBackground(Color.pink);
	    p2.add(text);text.setBounds(120,50,110,20);
	    enter=new Button("確定");cancel=new Button("取消");
	    p2.add(enter);enter.setBounds(50,100,35,20);enter.setBackground(Color.pink);
	    p2.add(cancel);cancel.setBounds(160,100,35,20);cancel.setBackground(Color.pink);
	    p3.setLayout(null);
	    Label name=new Label("姓名",Label.CENTER);text1=new TextField(15);
	    p3.add(name);name.setBounds(35,15,30,20);
	    p3.add(text1);text1.setBounds(75,15,140,20);text1.setBackground(Color.pink);
	    Label zhanghao=new Label("帳號",Label.CENTER);text2=new TextField(15);
	    p3.add(zhanghao);zhanghao.setBounds(35,55,30,20);
	    p3.add(text2);text2.setBounds(75,55,140,20);text2.setBackground(Color.pink);
	    Label yue=new Label("余額",Label.CENTER);text3=new TextField(15);
	    p3.add(yue);yue.setBounds(35,95,30,20);
	    p3.add(text3);text3.setBounds(75,95,140,20);text3.setBackground(Color.pink);
	    Label shenfen=new Label("身份證",Label.CENTER);text4=new TextField(15);
	    p3.add(shenfen);shenfen.setBounds(35,135,35,20);
	    p3.add(text4);text4.setBounds(75,135,140,20);text4.setBackground(Color.pink);
	    p4.setLayout(null);
	    Label label=new Label("注意:轉帳金額必須為整數",Label.CENTER);
	    p4.add(label);label.setBounds(55,20,150,20);
	    Label label1=new Label("請輸入對方帳號",Label.CENTER);text5=new TextField(15);
	    p4.add(label1);label1.setBounds(20,50,90,20);
	    p4.add(text5);text5.setBounds(120,50,120,20);text5.setBackground(Color.pink);
	    Label label2=new Label("請輸入轉帳金額",Label.CENTER);text6=new TextField(15);
	    p4.add(label2);label2.setBounds(20,90,90,20);
	    p4.add(text6);text6.setBounds(120,90,120,20);text6.setBackground(Color.pink);
	    button1=new Button("確定");button2=new Button("取消");
	    p4.add(button1);button1.setBounds(55,130,35,20);button1.setBackground(Color.pink);
	    p4.add(button2);button2.setBounds(165,130,35,20);button2.setBackground(Color.pink);
	    p5.setLayout(null);
	    Label label3=new Label("請輸入舊密碼",Label.CENTER);text7=new TextField(15);
	    p5.add(label3);label3.setBounds(20,15,90,20);
	    p5.add(text7);text7.setBounds(120,15,120,20);text7.setBackground(Color.pink);text7.setEchoChar('*');
	    Label label4=new Label("請輸入新密碼",Label.CENTER);text8=new TextField(15);
	    p5.add(label4);label4.setBounds(20,55,90,20);
	    p5.add(text8);text8.setBounds(120,55,120,20);text8.setBackground(Color.pink);text8.setEchoChar('*');
	    Label label5=new Label("請確認新密碼",Label.CENTER);text9=new TextField(15);
	    p5.add(label5);label5.setBounds(20,95,90,20);
	    p5.add(text9);text9.setBounds(120,95,120,20);text9.setBackground(Color.pink);text9.setEchoChar('*');
	    button3=new Button("確定");button4=new Button("取消");
	    p5.add(button3);button3.setBounds(30,135,35,20);button3.setBackground(Color.pink);
	    p5.add(button4);button4.setBounds(205,135,35,20);button4.setBackground(Color.pink);
	    enter.addActionListener(this);
	    cancel.addActionListener(this);
	    button1.addActionListener(this);
	    button2.addActionListener(this);
	    button3.addActionListener(this);
	    button4.addActionListener(this);
	    p.add("1",p1);p.add("2",p2);p.add("3",p3);p.add("4",p4);p.add("5",p5);
	    add(p);p.setBounds(90,50,250,200);
		setVisible(true);
		setResizable(false);
	}
	public void actionPerformed(ActionEvent e)
	{
		if(e.getSource()==quqian)
		{
			card.show(p,"2");
		}
		else if(e.getSource()==chaxun)
		{
			card.show(p,"3");
			try
			{
				con=DriverManager.getConnection("jdbc:odbc:superman","iceman","1986925");
		        sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
		        r=sql.executeQuery("SELECT * FROM user");
				while(r.next())
		        {
		        	String s=r.getString("counts");
		        	if(acount.equals(s))
		        	{
		        		text1.setText(r.getString("name"));text1.setEditable(false);
		                text2.setText(s);text2.setEditable(false);
		                text3.setText(r.getString("deposit"));text3.setEditable(false);
		                text4.setText(r.getString("number"));text4.setEditable(false);
	   	                break;
		        	}
		        }
		        con.close();
			}
			catch(SQLException ee)
			{
			}
		}
		else if(e.getSource()==zhuanzhang)
		{
			card.show(p,"4");
		}
		else if(e.getSource()==gaimi)
		{
			card.show(p,"5");
		}
		else if(e.getSource()==fanhui)
		{
			dispose();
			denglu redenglu=new denglu();
		}
		else if(e.getSource()==quit)
		{
			dispose();
		}
		else if(e.getSource()==enter)
		{
			if(text.getText().trim().equals(""))
			{
				JOptionPane.showMessageDialog(this,"請輸入取款金額!","提示",JOptionPane.ERROR_MESSAGE);
			}
			else if(Float.valueOf(text.getText().trim()).floatValue()<1.0)
			{
				JOptionPane.showMessageDialog(this,"取款金額必須大于1!","提示",JOptionPane.ERROR_MESSAGE);
			}
			else
			{
				try
				{
					con=DriverManager.getConnection("jdbc:odbc:superman","iceman","1986925");
		        	sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
		        	r=sql.executeQuery("SELECT * FROM user");
		        	while(r.next())
		        	{
		        		if(acount.equals(r.getString("counts")))
		        		{
		        			break;
		        		}
		        	}
					long a=r.getLong("deposit");
					if(a<Long.parseLong(text.getText().trim()))
					{
						JOptionPane.showMessageDialog(this,"對不起,余額不足!","提示",JOptionPane.ERROR_MESSAGE);
						con.close();
					}
					else if(a==Long.parseLong(text.getText().trim()))
					{
						JOptionPane.showMessageDialog(this,"余額不能為零,最小為1,若要全部取出,請辦理消戶業務!","提示",JOptionPane.WARNING_MESSAGE);
						con.close();
					}
					else
					{
						a=a-Long.parseLong(text.getText().trim());
					    String s="'"+acount+"'";
					    sql.executeUpdate("UPDATE user SET deposit="+a+" WHERE counts="+s);
					    JOptionPane.showMessageDialog(this,"交易成功,謝謝使用!","消息",JOptionPane.INFORMATION_MESSAGE);
					    text.setText(null);
					    con.close();
					}
				}
				catch(SQLException e1)
				{
				}
			}
		}
		else if(e.getSource()==cancel)
		{
			text.setText(null);
			card.show(p,"1");
		}
		else if(e.getSource()==button1)
		{
			try
			{
				con=DriverManager.getConnection("jdbc:odbc:superman","iceman","1986925");
		        sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
		        r=sql.executeQuery("SELECT * FROM user");
		        while(r.next())

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机精品视频导航| 亚洲欧美在线另类| 日韩精品一级二级 | 欧美欧美欧美欧美| 亚洲成人av福利| 91麻豆精品国产无毒不卡在线观看 | 精品一区二区在线视频| 久久亚洲综合色| 成人av午夜电影| 亚洲国产精品综合小说图片区| 欧美日韩国产一区二区三区地区| 日本系列欧美系列| 久久先锋影音av鲁色资源网| 94-欧美-setu| 午夜成人免费电影| 久久精品一区二区| 91猫先生在线| 日韩在线一二三区| 久久这里只有精品6| 91麻豆免费看| 麻豆国产欧美一区二区三区| 国产日韩v精品一区二区| 色综合一区二区| 男女男精品网站| 国产精品久久久久一区二区三区共| 91福利在线导航| 美女精品一区二区| 亚洲欧洲精品一区二区三区| 欧美美女直播网站| 成人免费视频国产在线观看| 亚洲bdsm女犯bdsm网站| 国产喷白浆一区二区三区| 欧美亚洲禁片免费| 国产永久精品大片wwwapp| 一区二区三区久久| 精品国产一区二区三区av性色| 99国产欧美久久久精品| 久久精品国产精品青草| 一区二区三区在线观看网站| 亚洲精品一区二区三区福利| 欧美在线视频全部完| 国产精品系列在线播放| 日韩精品一二区| 亚洲免费在线看| 国产亚洲自拍一区| 欧美一区二区三区视频免费| 91成人在线免费观看| 大白屁股一区二区视频| 美洲天堂一区二卡三卡四卡视频| 亚洲乱码日产精品bd| 国产日产欧美一区二区三区| 日韩欧美国产一区二区在线播放| 欧美在线观看一区| 成人性生交大合| 国产一区免费电影| 免费成人在线影院| 亚洲www啪成人一区二区麻豆| 国产精品免费久久| 久久久久青草大香线综合精品| 欧美一级在线视频| 欧美日韩精品一区二区| 91捆绑美女网站| aaa亚洲精品| av影院午夜一区| 盗摄精品av一区二区三区| 国产一区999| 久久97超碰色| 精品制服美女久久| 麻豆精品视频在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲伊人色欲综合网| 亚洲欧美另类久久久精品2019| 18成人在线视频| 中文字幕一区二区三区乱码在线 | 精品成人a区在线观看| 欧美一区二区三区婷婷月色| 欧美久久高跟鞋激| 9191久久久久久久久久久| 在线电影国产精品| 欧美一级在线视频| 精品成人佐山爱一区二区| 欧美大片一区二区| 精品国产3级a| 国产欧美日韩另类一区| 国产精品麻豆网站| 亚洲人成网站影音先锋播放| 亚洲欧美日韩国产综合| 亚洲小说欧美激情另类| 天天影视网天天综合色在线播放| 日韩黄色在线观看| 奇米影视在线99精品| 蜜臀91精品一区二区三区| 激情综合五月婷婷| 高清国产午夜精品久久久久久| 97久久精品人人做人人爽50路| 一本一道综合狠狠老| 欧美三级日韩三级| 精品三级在线看| 亚洲国产精品国自产拍av| 亚洲欧美一区二区三区极速播放 | 在线播放视频一区| 精品久久久久久无| 国产精品美女久久久久久久久久久| ●精品国产综合乱码久久久久| 夜夜嗨av一区二区三区| 免费av网站大全久久| 国产精品一级在线| 在线看日本不卡| 日韩美女天天操| 中文字幕一区二区三区四区不卡 | 久久欧美中文字幕| 日韩一区中文字幕| 亚洲成人精品一区二区| 国产一区二区三区四区五区美女 | 国产在线精品一区二区三区不卡| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 91美女福利视频| 日韩美女视频一区二区在线观看| 国产日产欧美一区二区三区| 亚洲成人av一区| 国产成人精品亚洲777人妖| 日本韩国欧美在线| 精品国偷自产国产一区| 亚洲丝袜精品丝袜在线| 精品在线一区二区三区| 在线观看成人小视频| 26uuu精品一区二区| 一二三四社区欧美黄| 国产成人日日夜夜| 欧美一级二级在线观看| 中日韩免费视频中文字幕| 日本人妖一区二区| 91婷婷韩国欧美一区二区| 精品国产免费一区二区三区四区| 一区二区三区四区激情 | 国产一区二区三区日韩| 欧美日韩视频专区在线播放| 亚洲国产成人在线| 老司机精品视频导航| 在线观看一区二区精品视频| 中文字幕电影一区| 麻豆精品久久精品色综合| 欧美亚洲免费在线一区| 中文在线免费一区三区高中清不卡| 日韩国产一二三区| 欧美亚洲综合久久| 椎名由奈av一区二区三区| 国产福利一区二区三区| 欧美成人激情免费网| 午夜电影网一区| 精品视频在线免费| 亚洲精品第一国产综合野| 国产不卡在线一区| 国产欧美精品区一区二区三区| 美女精品一区二区| 日韩午夜精品视频| 首页欧美精品中文字幕| 在线观看91精品国产入口| 亚洲视频小说图片| voyeur盗摄精品| 国产精品视频一二三| 国产精品一区二区三区乱码| 精品欧美一区二区在线观看| 蜜臀精品一区二区三区在线观看| 在线播放91灌醉迷j高跟美女| 香蕉久久一区二区不卡无毒影院 | 国产精品视频观看| 国产成人在线观看免费网站| 26uuu亚洲| 丰满亚洲少妇av| 国产精品国产成人国产三级| 99久久99久久综合| 亚洲综合999| 欧美色男人天堂| 奇米888四色在线精品| 欧美一卡二卡在线| 激情小说欧美图片| 国产人成一区二区三区影院| 国产经典欧美精品| 国产精品三级在线观看| 色域天天综合网| 午夜精品成人在线视频| 91精品国产乱码久久蜜臀| 免费在线成人网| 欧美激情一区二区在线| 不卡视频一二三| 一区二区三区欧美在线观看| 欧美色视频一区| 精品无人码麻豆乱码1区2区| 久久九九久精品国产免费直播| eeuss鲁一区二区三区| 亚洲自拍偷拍欧美| 欧美草草影院在线视频| 成人综合在线视频| 亚洲一区av在线| 日韩一区国产二区欧美三区| 国产九色sp调教91| 一区二区三区蜜桃| 精品久久久久久久久久久久久久久久久| 精品一区二区久久久|