• 大小: 2.79MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-05
  • 语言: C#
  • 标签: ATM  C#三层  SQL数据库  

资源简介

ATM自动柜员机(C#三层版,附SQL数据库文件),具备ATM自动取款机的所有功能,较为详细

资源截图

代码片段和文件信息

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; //卡号
        string type=““;  //交易类型
        ATMBll bll = new ATMBll();
        private void Null()
        {
        }
        #region 移动窗体
        [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 = “【正在处理中,请稍候......】“;
            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+“】查询余额成功!“;
        }
        //存款
        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       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个文件信息

评论

共有 条评论