private BankDatabase bankDatabase; // account info database

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Initializes a new Transaction Object
        /// </summary>
        /// <param name="customerAccountNumber">Transaction Account Number</param>
        /// <param name="currentTellerID">Teller involved with the Transaction </param>
        /// <param name="bankDatabase">Bank Database</param>
        /// <param name="timeOT">Time of Transaction</param>
        /// <param name="amount">Transaction Amount</param>
        public Transaction(long customerAccountNumber,int currentTellerID,BankDatabase bankDatabase,DateTime timeOT,decimal amount)
        {
            this.accountNumber = customerAccountNumber;
             this.tellerID = currentTellerID;
             this.bankDatabase = bankDatabase;
             this.timeOfTransaction = timeOT;
             this.amount = amount;
        }
        /// <summary>
        /// Method to ask for the singleton Object
        /// </summary>
        /// <returns>A BankDatabase Object</returns>
        public static BankDatabase GetInstance()
        {
            if (myDatabase == null)
            {
                myDatabase = new BankDatabase();
            }

            return myDatabase;
        }
        /// <summary>
        /// Initializes a BankingOperation object
        /// </summary>
        public BankingOperation()
        {
            tellerAuthenticated = false;
            currentTellerID = 0;
            currentAccountNumber = 0;
            Console.Title = "The Banking Application";
            depositorName = "";

            bankDatabase = BankDatabase.GetInstance();// creates a Single Instance of The BankDatabase
        }
 /// <summary>
 /// Initializes a new Withdrawal Object
 /// </summary>
 /// <param name="customerAccountNumber">Customer Account Number</param>
 /// <param name="currentTellerID">Teller involved with Transaction</param>
 /// <param name="bankDatabase">Bank Database</param>
 /// <param name="timeOT">Time of Transaction</param>
 /// <param name="amount">Transaction Amount</param>
 public Withdrawal(long customerAccountNumber, int currentTellerID, BankDatabase bankDatabase,DateTime timeOT,decimal amount)
     : base(customerAccountNumber,currentTellerID,bankDatabase,timeOT,amount)
 {
 }
Beispiel #5
0
 public Deposit(long customerAccountNumber, int currentTellerID,string DepositorName, BankDatabase bankDatabase,DateTime timeOT,decimal amount)
     : base(customerAccountNumber,currentTellerID,bankDatabase,timeOT,amount)
 {
 }