public virtual void AddCriteria(long?property, Expression <Func <T, bool> > expression)
 {
     if (property != null)
     {
         Criterias.Add(expression);
     }
 }
Exemplo n.º 2
0
        private void SubscribeAddCriteriaM()
        {
            MessagingCenter.Subscribe <NewCriteriaViewModel, Criteria>(this, "AddCriteriaM", (sender, args) => {
                Criterias.Add(args);

                //neues Criteria für jede Option in CurrentEvaluation hinzufügen
                foreach (var _option in CurrentEvaluation.Options)
                {
                    if (_option.Criterias != null)
                    {
                        _option.Criterias.Add(args);
                    }
                    else
                    {
                        _option.Criterias = new ObservableRangeCollection <Criteria>().ToList();
                        _option.Criterias.Add(args);
                    }
                }

                // Current Evaluation update
                try {
                    SqLiteConnection.UpdateWithChildren(CurrentEvaluation);
                } catch (Exception e) {
                    throw new NotImplementedException();
                }
            });
        }
 public virtual void AddCriteria(string property, Expression <Func <T, bool> > expression)
 {
     if (!string.IsNullOrEmpty(property))
     {
         Criterias.Add(expression);
     }
 }
Exemplo n.º 4
0
        public void Add(Criteria criteria)
        {
            if (Criterias.ContainsKey(criteria.Id))
            {
                return;
            }

            Criterias.Add(criteria.Id, criteria);
        }
Exemplo n.º 5
0
        private void OnAddCriteria(object parameter)
        {
            if (!CanAddCriteria(parameter))
            {
                return;
            }

            Criterias.Add(CreateCriteria(m_searchProperties[0]));
        }
Exemplo n.º 6
0
 public Ax6Context()
 {
     // seed
     if (Users.Count() == 0)
     {
         Users.Add(new User {
             Id = 1, Username = "******", Password = "******"
         });
         SaveChanges();
     }
     if (Criterias.Count() == 0)
     {
         Criterias.Add(new Criteria {
             Id = 1, Name = "Kleurgebruik (kleurenblind)", Description = "Is het kleurgebruik duidelijk? Is er geen informatie die je mist?"
         });
         Criterias.Add(new Criteria {
             Id = 2, Name = "Screenreader", Description = "Is het doel en de inhoud van de site duidelijk wanneer u de site met een screenreader bekijkt?"
         });
     }
 }
Exemplo n.º 7
0
        private void SubscribeAddCriteriaM()
        {
            MessagingCenter.Subscribe <NewCriteriaViewModel, Criteria>(this, "AddCriteriaM", (sender, args) => {
                //Add Options to new Criteria
                args.Options = CurrentEvaluation.Options;

                //Add new Criteria to Collection
                if (Criterias != null)
                {
                    Criterias.Add(args);
                }
                else
                {
                    Criterias = new ObservableRangeCollection <Criteria>();
                    Criterias.Add(args);
                }
                CurrentEvaluation.Criterias = new List <Criteria>(Criterias.ToList());

                //Update full Evaluation
                SqLiteConnection.UpdateWithChildren(CurrentEvaluation);
            });
        }
Exemplo n.º 8
0
 /// <summary>
 /// Add a criteria to the contest.
 /// </summary>
 /// <param name="criteria">The criteria to add</param>
 public void AddCriteria(Criteria criteria)
 {
     Criterias.Add(criteria);
     CriteriasToAdd.Add(criteria);
 }
 public void AddExitCriteria(Criteria criteria)
 {
     criteria.Type = CriteriaTypes.Exit;
     Criterias.Add(criteria);
 }
 public void AddEntryCriteria(Criteria criteria)
 {
     criteria.Type = CriteriaTypes.Entry;
     Criterias.Add(criteria);
 }
Exemplo n.º 11
0
 public IQueryAction CloseBracket()
 {
     Criterias.Add(new TextOnlyHqlProvider(string.Empty, Operator.None, ")"));
     return(this);
 }
Exemplo n.º 12
0
 public IQueryBuilder OpenBracket()
 {
     Criterias.Add(new TextOnlyHqlProvider(string.Empty, CurrentOperator, "("));
     CurrentOperator = Operator.None;
     return(this);
 }
Exemplo n.º 13
0
 protected BaseSpecification(Expression <Func <T, bool> > criteria)
 {
     Criterias.Add(criteria);
 }
 protected virtual void AddCriteria(Expression <Func <T, bool> > criteriaExpression)
 {
     Criterias.Add(criteriaExpression);
 }
 public virtual void AddCriteria(Expression <Func <T, bool> > expression)
 {
     Criterias.Add(expression);
 }