Пример #1
0
        static List <Transaction> FindMatches(string identifier, bool startsWith, bool caseSensitive)
        {
            List <Transaction> list = new List <Transaction>();

            foreach (string accountKey in StatementManager.AllStatements.Keys)
            {
                foreach (Statement statement in StatementManager.AllStatements[accountKey])
                {
                    foreach (Transaction transaction in statement.Transactions)
                    {
                        if (transaction.Description != null && TransactionType.DoesIdentifierMatch(identifier, transaction.Description, caseSensitive, startsWith))
                        {
                            list.Add(transaction);
                        }
                    }
                }
            }

            return(list);
        }