ATM自助取款機系統(tǒng)java代碼(共11頁)_第1頁
ATM自助取款機系統(tǒng)java代碼(共11頁)_第2頁
ATM自助取款機系統(tǒng)java代碼(共11頁)_第3頁
ATM自助取款機系統(tǒng)java代碼(共11頁)_第4頁
ATM自助取款機系統(tǒng)java代碼(共11頁)_第5頁
已閱讀5頁,還剩6頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領

文檔簡介

1、精選優(yōu)質(zhì)文檔-傾情為你奉上public void actionPerformed(ActionEvent e) /界面顯示控制 String IC_Number=; String password=; String IC_No=; z30.setVisible(false); float leftmoney=0; float moneys=0; float mon=0; float money1=0; float money2=0; if(true) int No_50=0,No_100=0; String strin=select NO_50,NO_100 from ATM where AT

2、M_ID=; ResultSet rsSQLSelect=executeQuery(strin); try if(rsSQLSelect.next() No_50=Integer.parseInt(rsSQLSelect.getString(NO_50); No_100=Integer.parseInt(rsSQLSelect.getString(NO_100); catch(Exception er)System.out.println(查詢ATM機信息出錯!); if(No_50=0&No_100=0) z1.setVisible(false); t1.setText(對不起,本ATM自動

3、取款機暫停服務!); cl.show(c,1); cl.show(c,1); if(e.getSource()=z1) t3.setText(); text1.setText(); cl.show(c,2); if(e.getSource()=z4|e.getSource()=z6|e.getSource()=z11|e.getSource()=z16|e.getSource()=z18|e.getSource()=z22) closeDBConnection(); cl.show(c,1); if(e.getSource()=z2) closeDBConnection(); System.e

4、xit(0); if(e.getSource()=z3) IC_Number=text1.getText().trim(); if(getname(IC_Number) z5.setVisible(true); pw1.setVisible(true); t4.setVisible(true); pw1.setText(); t5.setText(); cl.show(c,3); else t3.setText(您輸入的卡號不存在,請重新輸入!); cl.show(c,2); if(e.getSource()=z5) password=pw1.getText().trim(); IC_Numb

5、er=text1.getText().trim(); if(!login(IC_Number,password) t5.setText(您輸入的密碼錯誤,請重新輸入!); pw1.setText(); n-; cl.show(c,3); else t5.setText(); cl.show(c,4); if(n0) n=2; t5.setText(您已經(jīng)三次輸入錯誤密碼,謝謝您的使用,歡迎下次光臨!); z5.setVisible(false); pw1.setVisible(false); t4.setVisible(false); cl.show(c,3); if(e.getSource(

6、)=z7) t33.setText(); cl.show(c,5); if(e.getSource()=z8) /余額查詢 DBAccess d=new DBAccess(); String str3=; String stri=; IC_Number=text1.getText().trim(); t29.setText(IC_Number); leftmoney=getmoney(IC_Number); t30.setText(Float.toString(leftmoney); stri=select bank_name from IC,bank where IC.bank_NO=ban

7、k.bank_NO and IC_ID=+IC_Number+; ResultSet rsSQLSelect=d.executeQuery(stri); try if(rsSQLSelect.next() str3=rsSQLSelect.getString(bank_name); /mit(); catch(Exception er) t32.setText(str3); cl.show(c,10); if(e.getSource()=z9) t23.setText(); cl.show(c,9); if(e.getSource()=z10) t28.setText(); cl.show(c

8、,11); if(e.getSource()=z12) DBAccess d=new DBAccess(); IC_Number=text1.getText().trim(); fetchmoney=Integer.parseInt(text2.getText(); if(fetchmoney1000) t9.setText(每次交易金額最大為1000元!); text2.setText(); cl.show(c,6); return ; if(fetchmoney%50!=0) t9.setText(取款金額只能為50的倍數(shù)!); text2.setText(); cl.show(c,6);

9、 return ; leftmoney=getmoney(IC_Number); if(fetchmoneyleftmoney) t9.setText(您的余額不足,請重新輸入取款金額!); text2.setText(); cl.show(c,6); return ; int No_50=0,No_100=0,x_50=0,x_100=0,mo=0; String str1=select NO_50,NO_100 from ATM where ATM_ID=; ResultSet rsSQLSelect=d.executeQuery(str1); try if(rsSQLSelect.nex

10、t() No_50=Integer.parseInt(rsSQLSelect.getString(NO_50); No_100=Integer.parseInt(rsSQLSelect.getString(NO_100); catch(Exception er)System.out.println(查詢ATM機信息出錯!); x_100=fetchmoney/100; if(No_100No_50) t9.setText(取款機現(xiàn)鈔不足!); text2.setText(); cl.show(c,6); return; else No_50=No_50-x_50; No_100=0; else No_100=No_100-x_100; x_50=(fetchmoney-x_100*100)/50; if(x_50No_50) t9.setText(取款機50面值現(xiàn)鈔不足!); text2.setText(); cl.show(c,6); return; else No_50=No_50-x_50; String str2=update ATM set NO_50=+No_50+ where ATM_ID=+ATM_id+; String str3=update ATM set NO_100=+No_100+ where AT

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論