Ejemplo n.º 1
0
        public bool Update(Transaction transaction)
        {
            if (transaction == null) return false;

            var oldTransaction = MainData.Transactions.First(trans => trans.TransactionId == transaction.TransactionId);
            oldTransaction.Action = transaction.Action;
            oldTransaction.Amount = transaction.Amount;
            oldTransaction.Date = transaction.Date;
            oldTransaction.ActionDate = transaction.ActionDate;
            oldTransaction.Note = transaction.Note;

            return true;
        }
Ejemplo n.º 2
0
 public bool Insert(Transaction transaction)
 {
     if (transaction == null) return false;
     MainData.Transactions.Add(transaction);
     return true;
 }