Exemple #1
0
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("PopulationId"))
            {
                PopulationId = Convert.ToInt64(ExtendedProperties["PopulationId"]);
            }

            if (ExtendedProperties.ContainsKey("PopulationTypeId"))
            {
                PopulationTypeId = Convert.ToInt64(ExtendedProperties["PopulationTypeId"]);
            }

            if (ExtendedProperties.ContainsKey("PopulationEvaluationTypeInt32"))
            {
                PopulationEvaluationType = (Enumerations.DataExplorerNodeEvaluationPopulationEvaluationType)Convert.ToInt32(ExtendedProperties["PopulationEvaluationTypeInt32"]);
            }


            DateCriteria.MapFromExtendedProperties(ExtendedProperties);

            return;
        }
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("MetricId"))
            {
                MetricId = Convert.ToInt64(ExtendedProperties["MetricId"]);
            }

            if (ExtendedProperties.ContainsKey("ValueMinimum"))
            {
                ValueMinimum = Convert.ToDecimal(ExtendedProperties["ValueMinimum"]);
            }

            if (ExtendedProperties.ContainsKey("ValueMaximum"))
            {
                ValueMaximum = Convert.ToDecimal(ExtendedProperties["ValueMaximum"]);
            }

            if (ExtendedProperties.ContainsKey("CountOf"))
            {
                CountOf = Convert.ToInt32(ExtendedProperties["CountOf"]);
            }


            AgeCriteria.MapFromExtendedProperties(ExtendedProperties);

            DateCriteria.MapFromExtendedProperties(ExtendedProperties);

            return;
        }
        /// <summary>
        /// Returns the GenericProperty for this Entity.  This must be implemented by the inheriting class.
        /// </summary>
        /// <returns></returns>
        protected virtual string GetGenericProperty()
        {
            string genericProperty = String.Empty;

            if (ExtendedProperties.ContainsKey(Configuration.Instance.GenericPropertyExtendedProperty) && ((bool)ExtendedProperties[Configuration.Instance.GenericPropertyExtendedProperty]))
            {
                genericProperty = "<T>";
            }

            return(genericProperty);
        }
        /// <summary>
        /// Returns the description for this association.  This must be implemented by the inheriting class.
        /// </summary>
        /// <returns></returns>
        protected virtual string GetDescription()
        {
            string description = String.Empty;

            if (ExtendedProperties.ContainsKey(Configuration.Instance.DescriptionExtendedProperty))
            {
                description = ExtendedProperties[Configuration.Instance.DescriptionExtendedProperty].ToString().Replace("\r\n", " ").Replace("\n", " ").Trim();
            }

            return(description);
        }
Exemple #5
0
        virtual public void ExtendedProperties_SetValue(String propertyName, String propertyValue)
        {
            if (ExtendedProperties.ContainsKey(propertyName))
            {
                ExtendedProperties.Remove(propertyName);
            }

            ExtendedProperties.Add(propertyName, propertyValue);

            return;
        }
Exemple #6
0
 private T GetExtendedProperty <T>(string propertyName, T defaultValue)
 {
     if (ExtendedProperties.ContainsKey(propertyName))
     {
         object obj = ExtendedProperties[propertyName];
         if (obj != null && obj is T)
         {
             return((T)obj);
         }
         ExtendedProperties.Remove(propertyName);
     }
     return(null);
 }
Exemple #7
0
 public Object this[String propertyName]
 {
     get { return(ExtendedProperties.ContainsKey(propertyName) ? ExtendedProperties[propertyName] : null); }
     set
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties[propertyName] = value;
         }
         else
         {
             ExtendedProperties.Add(propertyName, value);
         }
     }
 }
Exemple #8
0
        virtual public String ExtendedProperties_GetValue(String propertyName, String defaultValue)
        {
            String value = String.Empty;

            if (ExtendedProperties.ContainsKey(propertyName))
            {
                value = ExtendedProperties[propertyName];
            }

            else
            {
                value = defaultValue;
            }

            return(value);
        }
Exemple #9
0
        virtual public void ExtendedPropertiesDeserialize(System.Xml.XmlNode extendedPropertiesXml)
        {
            foreach (System.Xml.XmlNode currentPropertyNode in extendedPropertiesXml.SelectNodes("./Property"))
            {
                // USE PUBLIC PROPERTY FOR ASSIGNMENT IN CASE OF OVERRIDE

                String propertyName = currentPropertyNode.Attributes["Name"].InnerText.Trim();

                if (!ExtendedProperties.ContainsKey(propertyName))
                {
                    ExtendedProperties.Add(propertyName, currentPropertyNode.InnerText.Trim());
                }
            }

            return;
        }
Exemple #10
0
 private void SetExtendedProperty <T>(string propertyName, string value)
 {
     if (string.IsNullOrEmpty(value))
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties.Remove(propertyName);
         }
     }
     else if (ExtendedProperties.ContainsKey(propertyName))
     {
         ExtendedProperties[propertyName] = value;
     }
     else
     {
         ExtendedProperties.Add(propertyName, value);
     }
 }
Exemple #11
0
        internal TaskStepProperties MergeWith(TaskStepProperties props)
        {
            var ret = new TaskStepProperties(ExtendedProperties);

            ret.WorkingDirectory = WorkingDirectory ?? props.WorkingDirectory;
            ret.CreateWindow     = CreateWindow ?? props.CreateWindow;
            ret.CaptureOutput    = CaptureOutput ?? props.CaptureOutput;
            ret.ShellExecute     = ShellExecute ?? props.ShellExecute;

            foreach (var kv in props.ExtendedProperties)
            {
                if (ExtendedProperties.ContainsKey(kv.Key))
                {
                    ret.ExtendedProperties.Add(kv.Key, kv.Value);
                }
            }

            return(ret);
        }
Exemple #12
0
 private void SetExtendedProperty <T>(string propertyName, T?value)
     where T : struct
 {
     if (value.HasValue)
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties[propertyName] = value.Value;
         }
         else
         {
             ExtendedProperties.Add(propertyName, value.Value);
         }
     }
     else if (ExtendedProperties.ContainsKey(propertyName))
     {
         ExtendedProperties.Remove(propertyName);
     }
 }
Exemple #13
0
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("InsurerId"))
            {
                InsurerId = Convert.ToInt64(ExtendedProperties["InsurerId"]);
            }

            if (ExtendedProperties.ContainsKey("ProgramId"))
            {
                ProgramId = Convert.ToInt64(ExtendedProperties["ProgramId"]);
            }

            if (ExtendedProperties.ContainsKey("BenefitPlanId"))
            {
                BenefitPlanId = Convert.ToInt64(ExtendedProperties["BenefitPlanId"]);
            }


            if (ExtendedProperties.ContainsKey("ContinuousEnrollment"))
            {
                ContinuousEnrollment = Convert.ToBoolean(ExtendedProperties["ContinuousEnrollment"]);
            }

            if (ExtendedProperties.ContainsKey("ContinuousAllowedGaps"))
            {
                ContinuousAllowedGaps = Convert.ToInt32(ExtendedProperties["ContinuousAllowedGaps"]);
            }

            if (ExtendedProperties.ContainsKey("ContinuousAllowedGapDays"))
            {
                ContinuousAllowedGapDays = Convert.ToInt32(ExtendedProperties["ContinuousAllowedGapDays"]);
            }


            DateCriteria.MapFromExtendedProperties(ExtendedProperties);

            return;
        }
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("InsurerId"))
            {
                InsurerId = Convert.ToInt64(ExtendedProperties["InsurerId"]);
            }

            if (ExtendedProperties.ContainsKey("ProgramId"))
            {
                ProgramId = Convert.ToInt64(ExtendedProperties["ProgramId"]);
            }

            if (ExtendedProperties.ContainsKey("BenefitPlanId"))
            {
                BenefitPlanId = Convert.ToInt64(ExtendedProperties["BenefitPlanId"]);
            }


            if (ExtendedProperties.ContainsKey("ContinuousAllowedGaps"))
            {
                ContinuousAllowedGaps = Convert.ToInt32(ExtendedProperties["ContinuousAllowedGaps"]);
            }

            if (ExtendedProperties.ContainsKey("ContinuousAllowedGapDays"))
            {
                ContinuousAllowedGapDays = Convert.ToInt32(ExtendedProperties["ContinuousAllowedGapDays"]);
            }

            if (ExtendedProperties.ContainsKey("ContinuousUntilAge"))
            {
                ContinuousUntilAge = Convert.ToInt32(ExtendedProperties["ContinuousUntilAge"]);
            }


            return;
        }
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("GenderInt32"))
            {
                Gender = (Core.Enumerations.Gender)Convert.ToInt32(ExtendedProperties["GenderInt32"]);
            }

            if (ExtendedProperties.ContainsKey("EthnicityId"))
            {
                EthnicityId = Convert.ToInt64(ExtendedProperties["EthnicityId"]);
            }


            AgeCriteria.MapFromExtendedProperties(ExtendedProperties);

            DateCriteria.MapFromExtendedProperties(ExtendedProperties);

            return;
        }
        public override void MapDataFields(System.Data.DataRow currentRow)
        {
            base.MapDataFields(currentRow, "DataExplorerNode");


            if (ExtendedProperties.ContainsKey("ServiceId"))
            {
                ServiceId = Convert.ToInt64(ExtendedProperties["ServiceId"]);
            }

            if (ExtendedProperties.ContainsKey("CountOf"))
            {
                CountOf = Convert.ToInt32(ExtendedProperties["CountOf"]);
            }


            AgeCriteria.MapFromExtendedProperties(ExtendedProperties);

            DateCriteria.MapFromExtendedProperties(ExtendedProperties);

            return;
        }
        /// <summary>
        /// Returns true if the passed in property has a specific flag set.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public bool IsType(PropertyType type)
        {
            switch (type)
            {
            case PropertyType.Keys:
                return(PropertyType.IsFlagOn(PropertyType.Key) || PropertyType.IsFlagOn(PropertyType.Foreign));

            case PropertyType.NoConcurrency:
                return(!PropertyType.IsFlagOn(PropertyType.Concurrency));

            case PropertyType.NoKey:
                return(!PropertyType.IsFlagOn(PropertyType.Key));

            case PropertyType.NoForeign:
                return(!PropertyType.IsFlagOn(PropertyType.Foreign));

            case PropertyType.NoKeys:
                return(!PropertyType.IsFlagOn(PropertyType.Key) && !PropertyType.IsFlagOn(PropertyType.Foreign));

            case PropertyType.NoKeysOrConcurrency:
                return(!PropertyType.IsFlagOn(PropertyType.Key) && !PropertyType.IsFlagOn(PropertyType.Foreign) && !PropertyType.IsFlagOn(PropertyType.Concurrency));

            case PropertyType.NonIdentity:
                return(!PropertyType.IsFlagOn(PropertyType.Identity));

            case PropertyType.UpdateInsert:
                return(!PropertyType.IsFlagOn(PropertyType.Identity) && !PropertyType.IsFlagOn(PropertyType.Concurrency) && !PropertyType.IsFlagOn(PropertyType.Computed) && !ExtendedProperties.ContainsKey(Configuration.Instance.IsReadOnlyColumnExtendedProperty));

            default:
                return(PropertyType.IsAnyFlagOn(type));
            }
        }