/// <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) { IErpQuoteLineItem erpQuoteLineItemItem = item.As <IErpQuoteLineItem>(); if (((erpQuoteLineItemItem != null) && this._parent.ErpQuoteLineItems.Remove(erpQuoteLineItemItem))) { return(true); } if ((this._parent.AssetModelCatalogue == item)) { this._parent.AssetModelCatalogue = null; return(true); } IErpPOLineItem erpPOLineItemItem = item.As <IErpPOLineItem>(); if (((erpPOLineItemItem != null) && this._parent.ErpPOLineItems.Remove(erpPOLineItemItem))) { return(true); } if ((this._parent.AssetModel == item)) { this._parent.AssetModel = null; return(true); } return(false); }
/// <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; } } }
/// <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.Organisation == null)) { IErpOrganisation organisationCasted = item.As <IErpOrganisation>(); if ((organisationCasted != null)) { this._parent.Organisation = organisationCasted; return; } } IWork worksCasted = item.As <IWork>(); if ((worksCasted != null)) { this._parent.Works.Add(worksCasted); } if ((this._parent.ErpQuoteLineItem == null)) { IErpQuoteLineItem erpQuoteLineItemCasted = item.As <IErpQuoteLineItem>(); if ((erpQuoteLineItemCasted != null)) { this._parent.ErpQuoteLineItem = erpQuoteLineItemCasted; return; } } IProject projectsCasted = item.As <IProject>(); if ((projectsCasted != null)) { this._parent.Projects.Add(projectsCasted); } }
/// <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); } }
/// <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) { IErpQuoteLineItem erpQuoteLineItemItem = item.As <IErpQuoteLineItem>(); if (((erpQuoteLineItemItem != null) && this._parent.ErpQuoteLineItems.Remove(erpQuoteLineItemItem))) { return(true); } return(false); }