예제 #1
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.CertificationPeriod == item))
                {
                    this._parent.CertificationPeriod = null;
                    return(true);
                }
                if ((this._parent.ErpPerson == item))
                {
                    this._parent.ErpPerson = null;
                    return(true);
                }
                ICraft craftItem = item.As <ICraft>();

                if (((craftItem != null) &&
                     this._parent.Crafts.Remove(craftItem)))
                {
                    return(true);
                }
                IQualificationRequirement qualificationRequirementItem = item.As <IQualificationRequirement>();

                if (((qualificationRequirementItem != null) &&
                     this._parent.QualificationRequirements.Remove(qualificationRequirementItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.CertificationPeriod == null))
                {
                    IDateTimeInterval certificationPeriodCasted = item.As <IDateTimeInterval>();
                    if ((certificationPeriodCasted != null))
                    {
                        this._parent.CertificationPeriod = certificationPeriodCasted;
                        return;
                    }
                }
                if ((this._parent.ErpPerson == null))
                {
                    IErpPerson erpPersonCasted = item.As <IErpPerson>();
                    if ((erpPersonCasted != null))
                    {
                        this._parent.ErpPerson = erpPersonCasted;
                        return;
                    }
                }
                ICraft craftsCasted = item.As <ICraft>();

                if ((craftsCasted != null))
                {
                    this._parent.Crafts.Add(craftsCasted);
                }
                IQualificationRequirement qualificationRequirementsCasted = item.As <IQualificationRequirement>();

                if ((qualificationRequirementsCasted != null))
                {
                    this._parent.QualificationRequirements.Add(qualificationRequirementsCasted);
                }
            }
예제 #3
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IQualificationRequirement qualificationRequirementItem = item.As <IQualificationRequirement>();

                if (((qualificationRequirementItem != null) &&
                     this._parent.QualificationRequirements.Remove(qualificationRequirementItem)))
                {
                    return(true);
                }
                if ((this._parent.CULaborCode == item))
                {
                    this._parent.CULaborCode = null;
                    return(true);
                }
                if ((this._parent.Status == item))
                {
                    this._parent.Status = null;
                    return(true);
                }
                ICompatibleUnit compatibleUnitItem = item.As <ICompatibleUnit>();

                if (((compatibleUnitItem != null) &&
                     this._parent.CompatibleUnits.Remove(compatibleUnitItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IQualificationRequirement qualificationRequirementsCasted = item.As <IQualificationRequirement>();

                if ((qualificationRequirementsCasted != null))
                {
                    this._parent.QualificationRequirements.Add(qualificationRequirementsCasted);
                }
                if ((this._parent.CULaborCode == null))
                {
                    ICULaborCode cULaborCodeCasted = item.As <ICULaborCode>();
                    if ((cULaborCodeCasted != null))
                    {
                        this._parent.CULaborCode = cULaborCodeCasted;
                        return;
                    }
                }
                if ((this._parent.Status == null))
                {
                    IStatus statusCasted = item.As <IStatus>();
                    if ((statusCasted != null))
                    {
                        this._parent.Status = statusCasted;
                        return;
                    }
                }
                ICompatibleUnit compatibleUnitsCasted = item.As <ICompatibleUnit>();

                if ((compatibleUnitsCasted != null))
                {
                    this._parent.CompatibleUnits.Add(compatibleUnitsCasted);
                }
            }
예제 #5
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.AssetProperites.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IReliabilityInfo reliabilityInfoItem = item.As <IReliabilityInfo>();

                if (((reliabilityInfoItem != null) &&
                     this._parent.ReliabilityInfos.Remove(reliabilityInfoItem)))
                {
                    return(true);
                }
                if (((userAttributeItem != null) &&
                     this._parent.Ratings.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IQualificationRequirement qualificationRequirementItem = item.As <IQualificationRequirement>();

                if (((qualificationRequirementItem != null) &&
                     this._parent.QualificationRequirements.Remove(qualificationRequirementItem)))
                {
                    return(true);
                }
                IAssetPropertyCurve assetPropertyCurveItem = item.As <IAssetPropertyCurve>();

                if (((assetPropertyCurveItem != null) &&
                     this._parent.AssetPropertyCurves.Remove(assetPropertyCurveItem)))
                {
                    return(true);
                }
                IDimensionsInfo dimensionsInfoItem = item.As <IDimensionsInfo>();

                if (((dimensionsInfoItem != null) &&
                     this._parent.DimensionsInfos.Remove(dimensionsInfoItem)))
                {
                    return(true);
                }
                IMedium mediumItem = item.As <IMedium>();

                if (((mediumItem != null) &&
                     this._parent.Mediums.Remove(mediumItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #6
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IUserAttribute assetProperitesCasted = item.As <IUserAttribute>();

                if ((assetProperitesCasted != null))
                {
                    this._parent.AssetProperites.Add(assetProperitesCasted);
                }
                IReliabilityInfo reliabilityInfosCasted = item.As <IReliabilityInfo>();

                if ((reliabilityInfosCasted != null))
                {
                    this._parent.ReliabilityInfos.Add(reliabilityInfosCasted);
                }
                IUserAttribute ratingsCasted = item.As <IUserAttribute>();

                if ((ratingsCasted != null))
                {
                    this._parent.Ratings.Add(ratingsCasted);
                }
                IQualificationRequirement qualificationRequirementsCasted = item.As <IQualificationRequirement>();

                if ((qualificationRequirementsCasted != null))
                {
                    this._parent.QualificationRequirements.Add(qualificationRequirementsCasted);
                }
                IAssetPropertyCurve assetPropertyCurvesCasted = item.As <IAssetPropertyCurve>();

                if ((assetPropertyCurvesCasted != null))
                {
                    this._parent.AssetPropertyCurves.Add(assetPropertyCurvesCasted);
                }
                IDimensionsInfo dimensionsInfosCasted = item.As <IDimensionsInfo>();

                if ((dimensionsInfosCasted != null))
                {
                    this._parent.DimensionsInfos.Add(dimensionsInfosCasted);
                }
                IMedium mediumsCasted = item.As <IMedium>();

                if ((mediumsCasted != null))
                {
                    this._parent.Mediums.Add(mediumsCasted);
                }
            }