예제 #1
0
        public void AddYodleeRule(int group, int rule, string literal)
        {
            Log.Debug("{0} {1} {2}", group, rule, literal);
            var oGroup = _yodleeGroupRepository.Get(group);
            var oRule  = _yodleeRuleRepository.Get(rule);

            if (oGroup != null && oRule != null)
            {
                if (
                    (!_yodleeGroupRuleMapRepository.GetAll()
                     .Any(
                         x =>
                         x.Group == oGroup && x.Rule == oRule &&
                         x.Rule.Id != (int)YodleeRule.IncludeLiteralWord &&
                         x.Rule.Id != (int)YodleeRule.DontIncludeLiteralWord)) ||
                    (!_yodleeGroupRuleMapRepository.GetAll()
                     .Any(
                         x =>
                         x.Group == oGroup && x.Rule == oRule &&
                         (x.Rule.Id == (int)YodleeRule.IncludeLiteralWord ||
                          x.Rule.Id == (int)YodleeRule.DontIncludeLiteralWord) &&
                         x.Literal == literal.Trim().ToLowerInvariant())))
                {
                    _yodleeGroupRuleMapRepository.Save(new MP_YodleeGroupRuleMap {
                        Group   = oGroup,
                        Rule    = oRule,
                        Literal = literal.Trim().ToLowerInvariant()
                    });

                    var t = new YodleeTransactionRepository(_session);
                    t.RemoveEzbobCategorization();
                }
            }
        }         // AddYodleeRule
예제 #2
0
파일: yodlee.cs 프로젝트: vijayamazon/ezbob
        }         // GetFileInfo

        public int GetLastTransactionId()
        {
            try {
                var t = new YodleeTransactionRepository(this._session);
                return(t.GetAll()
                       .Max(x => x.Id));
            } catch (Exception) {
                return(0);
            }
        }         // GetLastTransactionId