ATM系统源代码与可执行程序Word下载.docx

上传人:b****6 文档编号:17493326 上传时间:2022-12-06 格式:DOCX 页数:14 大小:26.44KB
下载 相关 举报
ATM系统源代码与可执行程序Word下载.docx_第1页
第1页 / 共14页
ATM系统源代码与可执行程序Word下载.docx_第2页
第2页 / 共14页
ATM系统源代码与可执行程序Word下载.docx_第3页
第3页 / 共14页
ATM系统源代码与可执行程序Word下载.docx_第4页
第4页 / 共14页
ATM系统源代码与可执行程序Word下载.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

ATM系统源代码与可执行程序Word下载.docx

《ATM系统源代码与可执行程序Word下载.docx》由会员分享,可在线阅读,更多相关《ATM系统源代码与可执行程序Word下载.docx(14页珍藏版)》请在冰豆网上搜索。

ATM系统源代码与可执行程序Word下载.docx

customerLogin.Show();

//打开新的CustomerLogin窗体,对人工服务登录.

BankManageSystembankManageSystem=new

BankManageSystem();

bankManageSystem.Show();

Aboutabout=newAbout();

about.Show();

LianXilianxi=newLianXi();

lianxi.Show();

//*操作界面窗体设计

*/

stringstrsql=@"

Data

Source=WIN-KOBGNACPI2K\SQLEXPRESS;

Initial

Catalog=Bank;

IntegratedSecurity=True"

;

sqlcon=newSqlConnection(strsql);

CustomerLogincl=newCustomerLogin();

cl.Show();

//打开CustomerLogin窗体,并关闭Login窗体。

BankManageSystembms=newBankManageSystem();

bms.Show();

//*连接数据库

privatevoidbutton1_Click(objectsender,EventArgse)

//db.Clogin(textBox1.Text,textBox2.Text);

//CustomerOperatiomco=newCustomerOperatiom();

//co.Show();

//this.Hide();

db=newDBManager();

stringstrsql="

select*fromCardinfo"

sqlds=db.seldemo(strsql);

stringcardid=this.textBox1.Text;

stringcardpwd=this.textBox2.Text;

stringtcardid=null;

stringtpwd=null;

foreach(DataRowdrinsqlds.Tables[0].Rows)

tcardid=dr["

cardid"

].ToString();

tpwd=dr["

cardpwd"

if(tcardid.Equals(cardid)&

&

tpwd.Equals(tpwd))

MessageBox.Show("

登录成功"

);

CustomerOperationcop=newCustomerOperation();

cop.Show();

else

卡号或密码错误"

break;

privatevoidbutton2_Click(objectsender,EventArgse)

textBox1.Clear();

textBox2.Clear();

textBox1.Focus();

}

//清除textBox文本框中的数据

privatevoidbutton3_Click(objectsender,EventArgse)

this.Close();

//*ATM登录界面窗体设计

}

Transformtf=newTransform();

tf.Show();

Savesave=newSave();

save.Show();

//打开新Save窗体,并关闭CustomerOperation窗体

Getget=newGet();

get.Show();

privatevoidbutton5_Click(objectsender,EventArgse)

Amendamend=newAmend();

amend.Show();

//修改密码

privatevoidbutton4_Click(objectsender,EventArgse)

Queryquery=newQuery();

query.Show();

privatevoidbutton6_Click(objectsender,EventArgse)

//*ATM机操作界面窗体设计

privatevoidbutton1_Click(objectsender,EventArgse)

stringname="

selectusenamefromCardinfo"

stringusename="

所汇账户的户主姓名为:

"

+db.Alluseb(name)+"

确定?

if(MessageBox.Show(usename,"

信息"

MessageBoxButtons.YesNo,MessageBoxIcon.Information,

MessageBoxDefaultButton.Button1)==DialogResult.Yes)

stringget="

selectcardidfromCardinfo"

stringgetmoney="

updateCardinfoset

cardmoney=cardmoney-'

+this.textBox2.Text+"

'

wherecardid='

+db.Alluseb(get)+"

stringsavemoney="

cardmoney=cardmoney+'

wherecardid='

+

this.textBox1.Text+"

db.Allusea(getmoney);

db.Allusea(savemoney);

转帐成功"

this.textBox1.Clear();

this.textBox2.Clear();

//访问数据库和修改数据库,主要用于转账

CustomerOperationco=newCustomerOperation();

co.Show();

//*ATM机转账界面窗体设计

if(Convert.ToInt32(this.textBox1.Text)>

0)

stringsave="

+this.textBox1.Text+"

where

cardid='

+db.Alluseb(get)+"

db.Allusea(save);

存款成功"

存款不能为负"

//*ATM机存款界面窗体设计

selectcardmoneyfromCardinfo"

if(Convert.ToInt32(this.textBox1.Text)

<

=Convert.ToDecimal(db.Alluseb(get)))

stringgeta="

+textBox1.Text+"

+db.Alluseb(geta)

+"

取款成功"

余额不足"

//对于输入金额进行校验

//*ATM机取款界面窗体设计

db=newDBManager();

stringpwd="

selectcardpwdfromCardinfo"

if(db.Alluseb(pwd).Equals(this.textBox3.Text))

if(this.textBox1.Text.Equals(this.textBox2.Text))

stringrepwd="

cardpwd='

db.Allusea(repwd);

stringrepwda="

updateCardinfosetcardrepwd='

+db.Alluseb(get)+"

db.Allusea(repwda);

密码修成功"

密码确认不一致"

原始密码错误"

//确认初始密码和修改初始密码是否一致

//*ATM机修改密码界面窗体设计

stringquery="

selectcardmoneyfromCardinfowherecardid='

db.Alluseb(get)+"

this.textBox1.Text=db.Alluseb(query);

查询成功"

//访问数据库,并读取cardmoney中的数据,且写入到textBox控件中

//*ATM余额查询界面窗体设计

stringname=this.textBox1.Text;

stringnumber=this.textBox2.Text;

stringpwd=this.textBox10.Text;

stringrepwd=this.textBox9.Text;

stringmoney=this.textBox11.Text;

stringlose="

Randomrd=newRandom();

stringcardid;

cardid=Convert.ToString(rd.Next(0,9))+

Convert.ToString(rd.Next(0,9))+Convert.ToString(rd.Next(0,9))

+Convert.ToString(rd.Next(0,9))+

+Convert.ToString(rd.Next(0,9));

db.openaccount(cardid,name,number,pwd,repwd,money,lose);

privatevoidbutton9_Click(objectsender,EventArgse)

stringclosea="

selectcardid,cardpwd,usenumberfromCardinfo

+this.textBox4.Text+"

"

if(db.Closeaccount(closea).Equals(this.textBox4.Text+

this.textBox12.Text+textBox3.Text))

stringxh="

deletefromCardinfowhere

db.Allusea(xh);

销户成功"

stringguashi="

selectcardlosefromCardinfowhere

+this.textBox15.Text+"

stringcloseb="

selectcardid,cardpwd,usenumber,cardlosefrom

Cardinfowherecardid='

+this.textBox15.Text+"

if(db.Closeaccount(closeb).Equals(this.textBox15.Text+

this.textBox13.Text+textBox5.Text))

stringstr=db.Allusebb(closeb).ToString();

if(str.Equals("

))

stringgua="

updateCardinfosetcardlose='

已挂失'

db.Allusea(gua);

成功挂失"

else{

该卡已挂失"

填写的资料有误请重新填写"

privatevoidbutton9_Click(objectsender,EventArgse)

privatevoidbutton8_Click(objectsender,EventArgse)

+this.textBox14.Text+"

stringclose="

29Cardinfowherecardid='

+this.textBox14.Text+"

stringtext=this.textBox14.Text+textBox6.Text+textBox7.Text;

if(db.Closeaccount(close).Equals(text))

stringstr=db.Allusebb(close).ToString();

if(str.Equals("

已挂失"

stringalose="

未挂失'

db.Allusea(alose);

解挂成功"

该账户未被挂失"

信息不正确"

//*人工服务界面窗体设计

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

当前位置:首页 > 工程科技 > 纺织轻工业

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1