ATM自助取款机系统java代码Word格式文档下载.docx

上传人:b****4 文档编号:8215407 上传时间:2023-05-10 格式:DOCX 页数:8 大小:15.37KB
下载 相关 举报
ATM自助取款机系统java代码Word格式文档下载.docx_第1页
第1页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第2页
第2页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第3页
第3页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第4页
第4页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第5页
第5页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第6页
第6页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第7页
第7页 / 共8页
ATM自助取款机系统java代码Word格式文档下载.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

ATM自助取款机系统java代码Word格式文档下载.docx

《ATM自助取款机系统java代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《ATM自助取款机系统java代码Word格式文档下载.docx(8页珍藏版)》请在冰点文库上搜索。

ATM自助取款机系统java代码Word格式文档下载.docx

{intNo_50=0,No_100=0;

Stringstrin="

selectNO_50,NO_100fromATMwhereATM_ID='

123456789'

ResultSetrsSQLSelect=executeQuery(strin);

try{

if(rsSQLSelect.next())

{

No_50=Integer.parseInt(rsSQLSelect.getString("

NO_50"

));

No_100=Integer.parseInt(rsSQLSelect.getString("

NO_100"

}

catch(Exceptioner){System.out.println("

查询ATM机信息出错!

);

}

if(No_50==0&

&

No_100==0)

{

z1.setVisible(false);

t1.setText("

对不起,本ATM自动取款机暂停服务!

cl.show(c,"

1"

if(e.getSource()==z1)

t3.setText("

text1.setText("

2"

if(e.getSource()==z4||e.getSource()==z6||e.getSource()==z11||e.getSource()==z16||e.getSource()==z18||e.getSource()==z22)

closeDBConnection();

if(e.getSource()==z2)

System.exit(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("

3"

else

您输入的卡号不存在,请重新输入!

if(e.getSource()==z5)

{password=pw1.getText().trim();

IC_Number=text1.getText().trim();

if(!

login(IC_Number,password))

您输入的密码错误,请重新输入!

n--;

4"

if(n<

0)

n=2;

您已经三次输入错误密码,谢谢您的使用,欢迎下次光临!

z5.setVisible(false);

pw1.setVisible(false);

t4.setVisible(false);

if(e.getSource()==z7)

t33.setText("

5"

if(e.getSource()==z8)//余额查询

{DBAccessd=newDBAccess();

Stringstr3="

Stringstri="

t29.setText(IC_Number);

leftmoney=getmoney(IC_Number);

t30.setText(Float.toString(leftmoney));

stri="

selectbank_namefromIC,bankwhereIC.bank_NO=bank.bank_NOandIC_ID='

+IC_Number+"

'

ResultSetrsSQLSelect=d.executeQuery(stri);

str3=rsSQLSelect.getString("

bank_name"

//mit();

catch(Exceptioner){}

t32.setText(str3);

10"

if(e.getSource()==z9)

t23.setText("

9"

if(e.getSource()==z10)

t28.setText("

11"

if(e.getSource()==z12)

fetchmoney=Integer.parseInt(text2.getText());

if(fetchmoney<

=0)

t9.setText("

取款金额非法!

请重新输入!

text2.setText("

6"

return;

if(fetchmoney>

1000)

每次交易金额最大为1000元!

return;

if(fetchmoney%50!

取款金额只能为50的倍数!

leftmoney)

您的余额不足,请重新输入取款金额!

intNo_50=0,No_100=0,x_50=0,x_100=0,mo=0;

Stringstr1="

ResultSetrsSQLSelect=d.executeQuery(str1);

x_100=fetchmoney/100;

if(No_100<

x_100)

mo=fetchmoney-No_100*100;

x_50=mo/50;

if(x_50>

No_50)

取款机现钞不足!

No_50=No_50-x_50;

No_100=0;

No_100=No_100-x_100;

x_50=(fetchmoney-x_100*100)/50;

取款机50面值现钞不足!

{No_50=No_50-x_50;

Stringstr2="

updateATMsetNO_50="

+No_50+"

whereATM_ID='

+ATM_id+"

updateATMsetNO_100="

+No_100+"

d.executeUpdate(str2);

d.executeUpdate(str3);

setmoney(fetchmoney,IC_Number);

t12.setText(Float.toString(fetchmoney));

7"

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2