• 大小: 5.11MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-12
  • 语言: C#
  • 标签: ATM  

资源简介

C#版ATM自动存款机,使用动态链接库!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Connect;

namespace ATM
{
    
    [Guid(“80E3E876-6595-417D-9BFE-BC6F4514664F“)]
    public interface IAdmin
    {
        bool Admin(string userName string passWordstring cardId);
        bool ManageAdmin(string userName string passWord string cardId);
        bool IsSuccessModifyPwd(string cardId string newPwd);
        bool IsSuccessWithDraw(string cardId string balancestring passWord);
        bool IsSuccessDeposit(string cardId string balance);
        string TransForm(string fromCardId string toCardId string money string passWord);

        string Proc_CreateAccount(string customerName string customerPid
                                  string telephone string openMoney string savingType
                                  string address);

        DataTable Query(string tableType string cardID);
       
    }
   
    [Guid(“F11AA4B9-89CF-4881-8111-3935B23F4676“)]
    [ClassInterface(ClassInterfaceType.None)]//不为类生成类接口
    public class AccessDB:IAdmin
    {
        /// 
        /// 构造函数
        /// 

        public AccessDB()
        { }

        #region 用户登录
        public bool Admin(string userName string passWordstring cardId)
        {
            var connect = new ConnectDB();
            DataTable isopen = connect.Proc_Admin(userNamepassWordcardId);

            if (isopen.Rows.Count != 0)
            {
                return true;
            }
            return false;
        }
        #endregion

        #region 管理员登录
        public bool ManageAdmin(string managerName string passWord string cardId)
        {
            var connect = new ConnectDB();
            DataTable isopen = connect.Manager_Admin(managerName passWord cardId);

            if (isopen.Rows.Count != 0)
            {
                return true;
            }
            return false;
        }
        #endregion

        #region 是否成功取款
        public bool IsSuccessWithDraw(string cardId string balance string passWord)
        {
            var connect = new ConnectDB();
            DataTable isSuccess = connect.WithDraw(cardId balance passWord);

            if (isSuccess.Rows.Count != 0)
            {
                return true;
            }
            return false;
        }
        #endregion

        #region 是否成功存款
        public bool IsSuccessDeposit(string cardId string balance)
        {
            var connect = new ConnectDB();
            DataTable isSuccess = connect.Deposit(cardId balance);

            if (isSuccess.Rows.Count != 0)
            {
                return true;
            }
            return false;
        }
        #endregion

        #region 是否成功修改密码
        public bool IsSuccessModifyPwd(string cardId string newPwd)
        {
         

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

     文件       4461  2013-05-25 23:00  ATM作业\ATM作业\ATM\ATM\AccessDB.cs

     文件       2393  2013-05-21 23:01  ATM作业\ATM作业\ATM\ATM\ATM.csproj

     文件      12288  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\bin\Debug\ATM.dll

     文件      28160  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\bin\Debug\ATM.pdb

     文件       2964  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\bin\Debug\ATM.tlb

     文件         69  2013-05-23 00:36  ATM作业\ATM作业\ATM\ATM\bin\Debug\DatabaselinkString.ini

     文件      19820  2013-05-25 23:00  ATM作业\ATM作业\ATM\ATM\ConnectDB.cs

     文件        565  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\obj\ATM.csproj.UnmanagedRegistration.cache

     文件        509  2013-05-24 12:02  ATM作业\ATM作业\ATM\ATM\obj\Debug\ATM.csproj.FileListAbsolute.txt

     文件      12288  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\obj\Debug\ATM.dll

     文件      28160  2013-05-25 23:01  ATM作业\ATM作业\ATM\ATM\obj\Debug\ATM.pdb

     文件       5681  2013-05-27 00:45  ATM作业\ATM作业\ATM\ATM\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1417  2013-05-21 22:58  ATM作业\ATM作业\ATM\ATM\Properties\AssemblyInfo.cs

     文件        899  2013-05-21 22:13  ATM作业\ATM作业\ATM\ATM.sln

    ..A..H.     19456  2013-05-27 01:43  ATM作业\ATM作业\ATM\ATM.suo

     文件       4379  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\AdminForm.cs

     文件       9908  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\AdminForm.Designer.cs

     文件       5817  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\AdminForm.resx

     文件       6798  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\ATM_Client.csproj

     文件      12288  2013-05-25 23:01  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM.dll

     文件      28160  2013-05-25 23:01  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM.pdb

     文件    1731584  2013-05-26 00:32  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM_Client.exe

     文件      91648  2013-05-26 00:32  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM_Client.pdb

     文件      11600  2013-05-27 01:02  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM_Client.vshost.exe

     文件        490  2009-08-31 00:40  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\ATM_Client.vshost.exe.manifest

     文件         69  2013-05-23 00:41  ATM作业\ATM作业\ATM_Client\ATM_Client\bin\Debug\DatabaselinkString.ini

     文件       1736  2013-05-26 00:32  ATM作业\ATM作业\ATM_Client\ATM_Client\Deposit.cs

     文件       5458  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\Deposit.Designer.cs

     文件       5817  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\Deposit.resx

     文件       2217  2013-05-26 00:31  ATM作业\ATM作业\ATM_Client\ATM_Client\MainForm.cs

............此处省略88个文件信息

评论

共有 条评论