Esempio n. 1
0
        /// <summary>
        /// Creates Rollup Rule
        /// </summary>
        /// <param name="childActivitySet">Child activity set.</param>
        /// <param name="conditions">Rollup conditions</param>
        /// <param name="action">Rollup action.</param>
        /// <returns>Rollup rule initialized with arguments.</returns>
        public static RollupRuleType CreateRollupRule(ChildActivityType childActivitySet, ConditionCombinationType conditionCombination, [NotNull] IEnumerable <RollupRuleTypeRollupConditionsRollupCondition> conditions, RollupActionType action)
        {
            RollupRuleType result = new RollupRuleType();

            result.childActivitySet = childActivitySet;
            result.rollupConditions = new RollupRuleTypeRollupConditions();
            result.rollupConditions.rollupCondition      = new ManifestNodeList <RollupRuleTypeRollupConditionsRollupCondition>(result.rollupConditions);
            result.rollupConditions.conditionCombination = conditionCombination;
            result.rollupConditions.rollupCondition.AddRange(conditions);
            result.rollupAction        = new RollupRuleTypeRollupAction();
            result.rollupAction.action = action;

            return(result);
        }
Esempio n. 2
0
 public RollupRuleType()
 {
     childActivitySetField = ChildActivityType.all;
     minimumCountField = "0";
     minimumPercentField = 0m;
 }
Esempio n. 3
0
        /// <summary>
        /// Creates Rollup Rule
        /// </summary>
        /// <param name="childActivitySet">Child activity set.</param>
        /// <param name="conditions">Rollup conditions</param>
        /// <param name="action">Rollup action.</param>
        /// <returns>Rollup rule initialized with arguments.</returns>
        public static RollupRuleType CreateRollupRule(ChildActivityType childActivitySet, ConditionCombinationType conditionCombination, [NotNull]IEnumerable<RollupRuleTypeRollupConditionsRollupCondition> conditions, RollupActionType action)
        {
            RollupRuleType result = new RollupRuleType();
            result.childActivitySet = childActivitySet;
            result.rollupConditions = new RollupRuleTypeRollupConditions();
            result.rollupConditions.rollupCondition = new ManifestNodeList<RollupRuleTypeRollupConditionsRollupCondition>(result.rollupConditions);
            result.rollupConditions.conditionCombination = conditionCombination;
            result.rollupConditions.rollupCondition.AddRange(conditions);
            result.rollupAction = new RollupRuleTypeRollupAction();
            result.rollupAction.action = action;

            return result;
        }