Ejemplo n.º 1
0
        private ICollection <ResultExtensionPropertyValue> CloneResultExtensionPropertyValues(Result newVersionResult,
                                                                                              ICollection <ResultExtensionPropertyValue> previousExtensionValues)
        {
            if (previousExtensionValues == null)
            {
                return(null);
            }
            else
            {
                var newVersionExtensionPropertyValules = new List <ResultExtensionPropertyValue>();

                foreach (var previousExtension in previousExtensionValues)
                {
                    var newVersionExtensionValue = new ResultExtensionPropertyValue();

                    newVersionExtensionValue.Result            = newVersionResult;
                    newVersionExtensionValue.BridgeID          = previousExtension.BridgeID;
                    newVersionExtensionValue.ExtensionProperty = previousExtension.ExtensionProperty;
                    newVersionExtensionValue.PropertyID        = previousExtension.PropertyID;
                    newVersionExtensionValue.PropertyValue     = previousExtension.PropertyValue;

                    newVersionExtensionPropertyValules.Add(newVersionExtensionValue);
                }

                return(newVersionExtensionPropertyValules);
            }
        }
        internal static void Link(Result result, ResultExtensionPropertyValue resultExtensionPropertyValue)
        {
            result.ResultExtensionPropertyValues.Add(resultExtensionPropertyValue);

            resultExtensionPropertyValue.Result   = result;
            resultExtensionPropertyValue.ResultID = result.ResultID;
        }
        public ResultExtensionPropertyValue Draft(int propertyID, string propertyValue)
        {
            var entity = new ResultExtensionPropertyValue();

            entity.PropertyID = propertyID;
            entity.PropertyValue = propertyValue;

            Validate(entity);

            return entity;
        }
        public ResultExtensionPropertyValue Draft(int propertyID, string propertyValue)
        {
            var entity = new ResultExtensionPropertyValue();

            entity.PropertyID    = propertyID;
            entity.PropertyValue = propertyValue;

            Validate(entity);

            return(entity);
        }
        internal static void Link(ResultExtensionPropertyValue resultExtensionPropertyValue, ExtensionProperty extensionProperty)
        {
            resultExtensionPropertyValue.ExtensionProperty = extensionProperty;

            extensionProperty.ResultExtensionPropertyValues.Add(resultExtensionPropertyValue);
        }
        private ICollection<ResultExtensionPropertyValue> CloneResultExtensionPropertyValues(Result newVersionResult, 
                                                                                             ICollection<ResultExtensionPropertyValue> previousExtensionValues)
        {
            if (previousExtensionValues == null)
            {
                return null;
            }
            else
            {
                var newVersionExtensionPropertyValules = new List<ResultExtensionPropertyValue>();

                foreach(var previousExtension in previousExtensionValues)
                {
                    var newVersionExtensionValue = new ResultExtensionPropertyValue();

                    newVersionExtensionValue.Result = newVersionResult;
                    newVersionExtensionValue.BridgeID = previousExtension.BridgeID;
                    newVersionExtensionValue.ExtensionProperty = previousExtension.ExtensionProperty;
                    newVersionExtensionValue.PropertyID = previousExtension.PropertyID;
                    newVersionExtensionValue.PropertyValue = previousExtension.PropertyValue;

                    newVersionExtensionPropertyValules.Add(newVersionExtensionValue);
                }

                return newVersionExtensionPropertyValules;
            }
        }
        internal static void Link(ResultExtensionPropertyValue resultExtensionPropertyValue, ExtensionProperty extensionProperty)
        {
            resultExtensionPropertyValue.ExtensionProperty = extensionProperty;

            extensionProperty.ResultExtensionPropertyValues.Add(resultExtensionPropertyValue);
        }
        internal static void Link(Result result, ResultExtensionPropertyValue resultExtensionPropertyValue)
        {
            result.ResultExtensionPropertyValues.Add(resultExtensionPropertyValue);

            resultExtensionPropertyValue.Result = result;
            resultExtensionPropertyValue.ResultID = result.ResultID;
        }