Пример #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IErpQuoteLineItem erpQuoteLineItemsCasted = item.As <IErpQuoteLineItem>();

                if ((erpQuoteLineItemsCasted != null))
                {
                    this._parent.ErpQuoteLineItems.Add(erpQuoteLineItemsCasted);
                }
                if ((this._parent.AssetModelCatalogue == null))
                {
                    IAssetModelCatalogue assetModelCatalogueCasted = item.As <IAssetModelCatalogue>();
                    if ((assetModelCatalogueCasted != null))
                    {
                        this._parent.AssetModelCatalogue = assetModelCatalogueCasted;
                        return;
                    }
                }
                IErpPOLineItem erpPOLineItemsCasted = item.As <IErpPOLineItem>();

                if ((erpPOLineItemsCasted != null))
                {
                    this._parent.ErpPOLineItems.Add(erpPOLineItemsCasted);
                }
                if ((this._parent.AssetModel == null))
                {
                    IAssetModel assetModelCasted = item.As <IAssetModel>();
                    if ((assetModelCasted != null))
                    {
                        this._parent.AssetModel = assetModelCasted;
                        return;
                    }
                }
            }
Пример #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.Status == null))
     {
         IStatus statusCasted = item.As <IStatus>();
         if ((statusCasted != null))
         {
             this._parent.Status = statusCasted;
             return;
         }
     }
     if ((this._parent.MaterialItem == null))
     {
         IMaterialItem materialItemCasted = item.As <IMaterialItem>();
         if ((materialItemCasted != null))
         {
             this._parent.MaterialItem = materialItemCasted;
             return;
         }
     }
     if ((this._parent.AssetModel == null))
     {
         IAssetModel assetModelCasted = item.As <IAssetModel>();
         if ((assetModelCasted != null))
         {
             this._parent.AssetModel = assetModelCasted;
             return;
         }
     }
 }
Пример #3
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.Asset == null))
     {
         IAsset assetCasted = item.As <IAsset>();
         if ((assetCasted != null))
         {
             this._parent.Asset = assetCasted;
             return;
         }
     }
     if ((this._parent.TypeAsset == null))
     {
         ITypeAsset typeAssetCasted = item.As <ITypeAsset>();
         if ((typeAssetCasted != null))
         {
             this._parent.TypeAsset = typeAssetCasted;
             return;
         }
     }
     if ((this._parent.AssetModel == null))
     {
         IAssetModel assetModelCasted = item.As <IAssetModel>();
         if ((assetModelCasted != null))
         {
             this._parent.AssetModel = assetModelCasted;
             return;
         }
     }
     if ((this._parent.DimensionsInfo == null))
     {
         IDimensionsInfo dimensionsInfoCasted = item.As <IDimensionsInfo>();
         if ((dimensionsInfoCasted != null))
         {
             this._parent.DimensionsInfo = dimensionsInfoCasted;
             return;
         }
     }
 }