版權(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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 同行競爭協(xié)議合同范本
- 2025年度企業(yè)自駕游租車合同二零二五年度專用3篇
- 2025版建筑起重機械租賃價格體系構(gòu)建及質(zhì)量控制合同3篇
- 2025年度個人土地承包權(quán)流轉(zhuǎn)保證金合同范本3篇
- 2025年全球及中國高效微??諝膺^濾器行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球陽極氧化再生行業(yè)調(diào)研及趨勢分析報告
- 2024年拉絲工職業(yè)技能競賽理論考試題庫(含答案)
- 2025年度個人租賃房屋租賃合同租賃物損壞賠償條款
- 二零二五年度車庫使用權(quán)抵押貸款合同4篇
- 2025年度個人旅游保險代理合同6篇
- 2024年安全教育培訓試題附完整答案(奪冠系列)
- 神農(nóng)架研學課程設計
- 文化資本與民族認同建構(gòu)-洞察分析
- 2025新譯林版英語七年級下單詞默寫表
- 【超星學習通】馬克思主義基本原理(南開大學)爾雅章節(jié)測試網(wǎng)課答案
- 《錫膏培訓教材》課件
- 斷絕父子關系協(xié)議書
- 福建省公路水運工程試驗檢測費用參考指標
- 2024年中國工業(yè)涂料行業(yè)發(fā)展現(xiàn)狀、市場前景、投資方向分析報告(智研咨詢發(fā)布)
- 自然科學基礎(小學教育專業(yè))全套教學課件
- 《工程勘察資質(zhì)分級標準和工程設計資質(zhì)分級標準》
評論
0/150
提交評論