コード例 #1
0
        public void deposit(decimal addAmt)
        {
            this.AccountBalance += addAmt;
            BankTransaction Instance = new BankTransaction(addAmt);

            Transaction.Add(Instance);
        }
コード例 #2
0
        public bool withdraw(decimal outAmt)
        {
            bool chk = false;

            if (outAmt > this.AccountBalance)
            {
                return(false);
            }
            else
            {
                this.AccountBalance -= outAmt;
                chk = true;
                BankTransaction Instance = new BankTransaction((outAmt * -1));
                Transaction.Add(Instance);
            }
            return(chk);
        }