Exemplo n.º 1
0
        public int AddWatchListRule(int watchListId, WatchListRule watchListRule)
        {
            WatchlistRule newRule = new WatchlistRule()
            {
                WatchlistId        = watchListId,
                ColumnId           = watchListRule.PropertyId,
                OperatorId         = watchListRule.ComparatorsId,
                RuleValue          = watchListRule.value,
                PipelineDuns       = watchListRule.PipelineDuns,
                LocationIdentifier = watchListRule.LocationIdentifier,
                IsCriticalNotice   = watchListRule.IsCriticalNotice,
                AlertSent          = watchListRule.AlertSent,
                AlertFrequency     = watchListRule.AlertFrequency,
                UpperRuleValue     = watchListRule.UpperValue
            };

            DbContext.WatchlistRules.Add(newRule);
            DbContext.SaveChanges();
            return(newRule.Id);
        }
Exemplo n.º 2
0
 public void Delete(WatchlistRule item)
 {
     DbContext.WatchlistRules.Remove(item);
     DbContext.SaveChanges();
 }