版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上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(您已经三次输入错误密码,谢谢您的使用,欢迎下次光临!); 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的倍数!); 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(取款机现钞不足!); 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面值现钞不足!); 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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 期末测试卷(外研版四年级英语上册Unit1-6)(含答案含听力原文)
- 自行车与电动自行车装配工操作评估测试考核试卷含答案
- 幻灯机与投影仪装配调试工岗前实操知识技能考核试卷含答案
- 经济昆虫养殖员岗前安全技能测试考核试卷含答案
- 遗体火化师岗前能力评估考核试卷含答案
- 野生动物疫病防治工保密考核试卷含答案
- 真空垂熔工风险识别考核试卷含答案
- 梳理化学粘合非织造布制作工道德能力考核试卷含答案
- 白酒贮酒工岗位知识体系考核试卷含答案
- 植物检疫工创新思维评优考核试卷含答案
- 气体检测仪器专项检查记录表模板
- 医院新员工信息安全培训课件
- 海尔冰箱BCD-231WDCV使用说明书
- 药品采购预警管理制度
- 新生儿真菌感染的护理
- 卧式椭圆封头储罐液位体积对照表
- 工程合作管理协议书格式
- 四年级教材《劳动》课件
- 小学文明礼仪教育班会 问候一声温暖人心 课件
- 沈鼓集团管理咨询与IT诊断及ERP优化升级项目工作说明书-V1 .0-Peter
- 北京市首都师大附中2023年八上数学期末统考试题含解析
评论
0/150
提交评论