/// <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.Season == item)) { this._parent.Season = null; return(true); } if ((this._parent.Measurement == item)) { this._parent.Measurement = null; return(true); } IErpOrganisation erpOrganisationItem = item.As <IErpOrganisation>(); if (((erpOrganisationItem != null) && this._parent.Organisations.Remove(erpOrganisationItem))) { return(true); } if ((this._parent.Flowgate == item)) { this._parent.Flowgate = 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) { 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) { IErpOrganisation organisationsCasted = item.As <IErpOrganisation>(); if ((organisationsCasted != null)) { this._parent.Organisations.Add(organisationsCasted); } }
/// <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) { IErpOrganisation erpOrganisationItem = item.As <IErpOrganisation>(); if (((erpOrganisationItem != null) && this._parent.Organisations.Remove(erpOrganisationItem))) { 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) { IMarket marketsCasted = item.As <IMarket>(); if ((marketsCasted != null)) { this._parent.Markets.Add(marketsCasted); } IMarketProduct marketProductsCasted = item.As <IMarketProduct>(); if ((marketProductsCasted != null)) { this._parent.MarketProducts.Add(marketProductsCasted); } IMeter metersCasted = item.As <IMeter>(); if ((metersCasted != null)) { this._parent.Meters.Add(metersCasted); } if ((this._parent.Pnode == null)) { IPnode pnodeCasted = item.As <IPnode>(); if ((pnodeCasted != null)) { this._parent.Pnode = pnodeCasted; return; } } if ((this._parent.Organisation == null)) { IErpOrganisation organisationCasted = item.As <IErpOrganisation>(); if ((organisationCasted != null)) { this._parent.Organisation = organisationCasted; return; } } IResourceGroup resourceGroupsCasted = item.As <IResourceGroup>(); if ((resourceGroupsCasted != null)) { this._parent.ResourceGroups.Add(resourceGroupsCasted); } }
/// <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.ErpOrganisation == null)) { IErpOrganisation erpOrganisationCasted = item.As <IErpOrganisation>(); if ((erpOrganisationCasted != null)) { this._parent.ErpOrganisation = erpOrganisationCasted; return; } } ILandProperty landPropertyCasted = item.As <ILandProperty>(); if ((landPropertyCasted != null)) { this._parent.LandProperty.Add(landPropertyCasted); } }
/// <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.Document == null)) { IDocument documentCasted = item.As <IDocument>(); if ((documentCasted != null)) { this._parent.Document = documentCasted; return; } } if ((this._parent.ErpOrganisation == null)) { IErpOrganisation erpOrganisationCasted = item.As <IErpOrganisation>(); if ((erpOrganisationCasted != null)) { this._parent.ErpOrganisation = erpOrganisationCasted; 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.ErpOrganisation == null)) { IErpOrganisation erpOrganisationCasted = item.As <IErpOrganisation>(); if ((erpOrganisationCasted != null)) { this._parent.ErpOrganisation = erpOrganisationCasted; return; } } if ((this._parent.Asset == null)) { IAsset assetCasted = item.As <IAsset>(); if ((assetCasted != null)) { this._parent.Asset = assetCasted; 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.ChildOrganisation == null)) { IErpOrganisation childOrganisationCasted = item.As <IErpOrganisation>(); if ((childOrganisationCasted != null)) { this._parent.ChildOrganisation = childOrganisationCasted; return; } } if ((this._parent.ParentOrganisation == null)) { IErpOrganisation parentOrganisationCasted = item.As <IErpOrganisation>(); if ((parentOrganisationCasted != null)) { this._parent.ParentOrganisation = parentOrganisationCasted; 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.PowerSystemResource == null)) { IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>(); if ((powerSystemResourceCasted != null)) { this._parent.PowerSystemResource = powerSystemResourceCasted; return; } } if ((this._parent.ErpOrganisation == null)) { IErpOrganisation erpOrganisationCasted = item.As <IErpOrganisation>(); if ((erpOrganisationCasted != null)) { this._parent.ErpOrganisation = erpOrganisationCasted; 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.Season == null)) { ISeason seasonCasted = item.As <ISeason>(); if ((seasonCasted != null)) { this._parent.Season = seasonCasted; return; } } if ((this._parent.Measurement == null)) { IMeasurement measurementCasted = item.As <IMeasurement>(); if ((measurementCasted != null)) { this._parent.Measurement = measurementCasted; return; } } IErpOrganisation organisationsCasted = item.As <IErpOrganisation>(); if ((organisationsCasted != null)) { this._parent.Organisations.Add(organisationsCasted); } if ((this._parent.Flowgate == null)) { IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate = flowgateCasted; return; } } }