/// <summary>Creates a new, empty TargetConditionEntity object.</summary>
        /// <returns>A new, empty TargetConditionEntity object.</returns>
        public override IEntity Create()
        {
            IEntity toReturn = new TargetConditionEntity();

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewTargetCondition
            // __LLBLGENPRO_USER_CODE_REGION_END
            return(toReturn);
        }
Ejemplo n.º 2
0
        private void loadSubject(TargetEntity te, XmlNode node)
        {
            DecisionNodeEntity ce = new DecisionNodeEntity();

            TargetConditionEntity tce = new TargetConditionEntity();

            tce.Target       = te;
            tce.DecisionNode = ce;

            loadCondition(ce, node);
        }
Ejemplo n.º 3
0
        static public TargetEntity dupTarget(TargetEntity original)
        {
            TargetEntity copy = new TargetEntity(original.Id);

            duplicator.MarkEntityDirty(copy);
            copy.IsNew = true;

            foreach (TargetConditionEntity tce in original.TargetCondition)
            {
                TargetConditionEntity tceCopy = new TargetConditionEntity();
                tceCopy.DecisionNode = dupCondition(tce.DecisionNode);
                tceCopy.Target       = copy;
            }

            return(copy);
        }
Ejemplo n.º 4
0
        public ActionResult CreateTargetCondition(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            vData.Target               = new TargetEntity(id);
            vData.Condition            = new DecisionNodeEntity();
            vData.Condition.Type       = constants.conditionType;
            vData.Condition.CombineAnd = true;

            TargetConditionEntity tce = new TargetConditionEntity();

            tce.Target       = vData.Target;
            tce.DecisionNode = vData.Condition;
            tce.Save(true);

            ViewData["title"] = "new target condition";

            return(View("EditTarget", vData));
        }