コード例 #1
0
 public bool Add(Transaction transaction)
 {
     if (transaction != null && _transactionList.IndexOf(transaction) == -1)
     {
         _transactionList.Add(transaction);
         return true;
     }
     return false;
 }
コード例 #2
0
ファイル: SellTransaction.cs プロジェクト: anagri/sharekhan
        private bool IsShortTerm(Transaction transaction)
        {
            DateTime sellDate;
            DateTime buyDate;
            if (this.Date.CompareTo(transaction.Date) > 0)
            {
                sellDate = Date;
                buyDate = transaction.Date;
            }
            else
            {
                buyDate = Date;
                sellDate = transaction.Date;
            }

            return sellDate.Subtract(buyDate).Days < NUMBER_OF_DAYS_IN_YEAR;
        }
コード例 #3
0
 public void addTransaction(Transaction transaction)
 {
     _transactionList.Add(transaction);
 }