/// <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.ErpLedgerBudget == null)) { IErpLedgerBudget erpLedgerBudgetCasted = item.As <IErpLedgerBudget>(); if ((erpLedgerBudgetCasted != null)) { this._parent.ErpLedgerBudget = erpLedgerBudgetCasted; return; } } if ((this._parent.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; return; } } if ((this._parent.ErpLedBudLineItem_ == null)) { IErpLedgerEntry erpLedBudLineItemCasted = item.As <IErpLedgerEntry>(); if ((erpLedBudLineItemCasted != null)) { this._parent.ErpLedBudLineItem_ = erpLedBudLineItemCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IErpLedgerEntry erpLedgerEntriesCasted = item.As <IErpLedgerEntry>(); if ((erpLedgerEntriesCasted != null)) { this._parent.ErpLedgerEntries.Add(erpLedgerEntriesCasted); } }
/// <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) { IErpLedgerEntry erpLedgerEntryItem = item.As <IErpLedgerEntry>(); if (((erpLedgerEntryItem != null) && this._parent.ErpLedgerEntries.Remove(erpLedgerEntryItem))) { return(true); } return(false); }
/// <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.Market == item)) { this._parent.Market = null; return(true); } IErpLedgerEntry erpLedgerEntryItem = item.As <IErpLedgerEntry>(); if (((erpLedgerEntryItem != null) && this._parent.ErpLedgerEntries.Remove(erpLedgerEntryItem))) { return(true); } IErpInvoiceLineItem erpInvoiceLineItemItem = item.As <IErpInvoiceLineItem>(); if (((erpInvoiceLineItemItem != null) && this._parent.ErpInvoiceLineItems.Remove(erpInvoiceLineItemItem))) { 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.Market == null)) { IMarket marketCasted = item.As <IMarket>(); if ((marketCasted != null)) { this._parent.Market = marketCasted; return; } } IErpLedgerEntry erpLedgerEntriesCasted = item.As <IErpLedgerEntry>(); if ((erpLedgerEntriesCasted != null)) { this._parent.ErpLedgerEntries.Add(erpLedgerEntriesCasted); } IErpInvoiceLineItem erpInvoiceLineItemsCasted = item.As <IErpInvoiceLineItem>(); if ((erpInvoiceLineItemsCasted != null)) { this._parent.ErpInvoiceLineItems.Add(erpInvoiceLineItemsCasted); } }