-
大小: 2.79MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-11-05
- 語(yǔ)言: C#
- 標(biāo)簽: ATM??C#三層??SQL數(shù)據(jù)庫(kù)??
資源簡(jiǎn)介
ATM自動(dòng)柜員機(jī)(C#三層版,附SQL數(shù)據(jù)庫(kù)文件),具備ATM自動(dòng)取款機(jī)的所有功能,較為詳細(xì)

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
using?BLL;
using?Model;
using?System.Runtime.InteropServices;
namespace?ATM
{
????public?partial?class?FrmMain?:?Form
????{
????????public?FrmMain(string?cardNo)
????????{
????????????this.cardNo?=?cardNo;
????????????InitializeComponent();
????????}
????????string?cardNo;?//卡號(hào)
????????string?type=““;??//交易類型
????????ATMBll?bll?=?new?ATMBll();
????????private?void?Null()
????????{
????????}
????????#region?移動(dòng)窗體
????????[DllImport(“user32.dll“)]
????????public?static?extern?bool?Rese();
????????protected?override?void?WndProc(ref?Message?m)
????????{
????????????switch?(m.Msg)
????????????{
????????????????case?0x84:
????????????????????base.WndProc(ref?m);
????????????????????if?(m.Result?==?(IntPtr)0x1)
????????????????????{
????????????????????????m.Result?=?(IntPtr)2;
????????????????????????return;
????????????????????}
????????????????????break;
????????????}
????????????base.WndProc(ref?m);
????????}
????????#endregion
????????#region?控件的顯示與隱藏
????????public?void?ContrlsSignOut()????//隱藏
????????{
????????????this.lblAccount.Visible?=?false;
????????????this.lblMoney.Visible?=?false;
????????????this.lblInfo.Visible?=?false;
????????????this.txtAccount.Visible?=?false;
????????????this.txtMoney.Visible?=?false;
????????????this.btnClear.Visible?=?false;
????????????this.btnOK.Visible?=?false;
????????}
????????public?void?ContrlsSignOn()??//顯示
????????{
????????????this.lblAccount.Visible?=?true;
????????????this.lblMoney.Visible?=?true;
????????????this.lblInfo.Visible?=?true;
????????????this.txtAccount.Visible?=?true;
????????????this.txtMoney.Visible?=?true;
????????????this.btnClear.Visible?=?true;
????????????this.btnOK.Visible?=?true;
????????}
????????#endregion
????????//窗體加載
????????private?void?FrmMain_Load(object?sender?EventArgs?e)
????????{
????????????ContrlsSignOut();
????????}
????????//查詢余額
????????private?void?btnSelect_Click(object?sender?EventArgs?e)
????????{
????????????ContrlsSignOut();????//隱藏控件
????????????this.btnReBank.Text?=?“返回“;
????????????this.lblTishi.Text?=?“【正在處理中,請(qǐng)稍候......】“;
????????????String?msg?=?““;
????????????string?Sql?=?String.Format(“?select?Balance?from?Account??where?CardNo=‘{0}‘“?this.cardNo);
????????????ATMBll?bll?=?new?ATMBll();
????????????SqlDataReader?reader?=?bll.ExecuteReader(SqlCommandType.Textref?msg);
????????????if?(reader.Read())
????????????{
????????????????msg?=?“你的余額為:\n\t\t?RMB?“+reader[0].ToString()+“?元。“;
????????????}
????????????this.lblInfo.Visible?=?true;
????????????this.btnOK.Visible?=?true;
????????????this.lblInfo.Text?=?msg;
????????????type?=?((Button)sender).Text;
????????????this.lblTishi.Text?=?“賬戶:【“+cardNo+“】查詢余額成功!“;
????????}
????????//存款
????????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????4676??2011-07-15?18:02??ATM\ATM\ATMWinFrmUI.csproj
?????文件??????46592??2011-07-16?09:16??ATM\ATM\bin\Debug\ATM.pdb
?????文件????????601??2011-07-15?21:04??ATM\ATM\bin\Debug\ATM.sln
?????文件???????7168??2011-07-15?21:04??ATM\ATM\bin\Debug\ATM.suo
?????文件??????14328??2011-07-16?09:17??ATM\ATM\bin\Debug\ATM.vshost.exe
?????文件????????490??2007-07-21?01:33??ATM\ATM\bin\Debug\ATM.vshost.exe.manifest
?????文件???????6144??2011-07-16?08:47??ATM\ATM\bin\Debug\BLL.dll
?????文件??????17920??2011-07-16?08:47??ATM\ATM\bin\Debug\BLL.pdb
?????文件???????4608??2011-07-15?21:02??ATM\ATM\bin\Debug\Model.dll
?????文件??????15872??2011-07-15?21:02??ATM\ATM\bin\Debug\Model.pdb
?????文件???????9216??2011-07-16?08:36??ATM\ATM\bin\Debug\SqlServerDAL.dll
?????文件??????26112??2011-07-16?08:36??ATM\ATM\bin\Debug\SqlServerDAL.pdb
?????文件???????7251??2011-07-16?09:18??ATM\ATM\FrmMain.cs
?????文件??????13968??2011-07-16?09:18??ATM\ATM\FrmMain.Designer.cs
?????文件?????228198??2011-07-16?09:18??ATM\ATM\FrmMain.resx
?????文件????1950720??2011-07-16?09:16??ATM\ATM\obj\Debug\ATM.exe
?????文件?????146967??2011-07-16?09:16??ATM\ATM\obj\Debug\ATM.FrmMain.resources
?????文件??????46592??2011-07-16?09:16??ATM\ATM\obj\Debug\ATM.pdb
?????文件?????479027??2011-07-16?08:47??ATM\ATM\obj\Debug\ATM.Properties.Resources.resources
?????文件????1303292??2011-07-16?09:16??ATM\ATM\obj\Debug\ATM.ReadCard.resources
?????文件???????1530??2011-07-16?09:17??ATM\ATM\obj\Debug\ATMWinFrmUI.csproj.FileListAbsolute.txt
?????文件???????1026??2011-07-16?09:16??ATM\ATM\obj\Debug\ATMWinFrmUI.csproj.GenerateResource.Cache
?????文件??????13869??2011-07-16?08:47??ATM\ATM\obj\Debug\ResolveAssemblyReference.cache
?????文件???????5120??2011-07-15?15:04??ATM\ATM\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????487??2011-07-15?14:11??ATM\ATM\Program.cs
?????文件???????1346??2011-07-15?14:09??ATM\ATM\Properties\AssemblyInfo.cs
?????文件???????3575??2011-07-15?15:04??ATM\ATM\Properties\Resources.Designer.cs
?????文件???????6675??2011-07-15?15:04??ATM\ATM\Properties\Resources.resx
?????文件???????1088??2011-07-15?14:09??ATM\ATM\Properties\Settings.Designer.cs
?????文件????????249??2011-07-15?14:09??ATM\ATM\Properties\Settings.settings
............此處省略86個(gè)文件信息
評(píng)論
共有 條評(píng)論