Beispiel #1
0
 public void AddCondition(IUpdateCondition cnd, ConditionType type)
 {
     if (ChildConditions == null)
     {
         ChildConditions = new LinkedList <ConditionItem>();
     }
     ChildConditions.AddLast(new ConditionItem(cnd, type));
 }
Beispiel #2
0
        internal string ToBodyConditions()
        {
            var body = new CWConditionBody
            {
                Conditions            = Conditions != null && Conditions.Any() ? and(Conditions) : null,
                ChildConditions       = ChildConditions != null && ChildConditions.Any() ? and(ChildConditions) : null,
                CustomFieldConditions = CustomFieldConditions != null && CustomFieldConditions.Any() ? and(CustomFieldConditions) : null,
                OrderBy = !string.IsNullOrWhiteSpace(OrderBy) ? OrderBy : null
            };

            return(JsonConvert.SerializeObject(body));
        }