/// <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) { IErpPayableLineItem erpPayableLineItemItem = item.As <IErpPayableLineItem>(); if (((erpPayableLineItemItem != null) && this._parent.ErpPayableLineItems.Remove(erpPayableLineItemItem))) { return(true); } IErpInvoiceLineItem erpInvoiceLineItemItem = item.As <IErpInvoiceLineItem>(); if (((erpInvoiceLineItemItem != null) && this._parent.ErpInvoiceLineItems.Remove(erpInvoiceLineItemItem))) { return(true); } IErpRecLineItem erpRecLineItemItem = item.As <IErpRecLineItem>(); if (((erpRecLineItemItem != null) && this._parent.ErpRecLineItems.Remove(erpRecLineItemItem))) { 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.ErpPOLineItem == null)) { IErpPOLineItem erpPOLineItemCasted = item.As <IErpPOLineItem>(); if ((erpPOLineItemCasted != null)) { this._parent.ErpPOLineItem = erpPOLineItemCasted; return; } } if ((this._parent.ErpInvoiceLineItem == null)) { IErpInvoiceLineItem erpInvoiceLineItemCasted = item.As <IErpInvoiceLineItem>(); if ((erpInvoiceLineItemCasted != null)) { this._parent.ErpInvoiceLineItem = erpInvoiceLineItemCasted; return; } } if ((this._parent.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; return; } } if ((this._parent.ErpReceiveDelivery == null)) { IErpReceiveDelivery erpReceiveDeliveryCasted = item.As <IErpReceiveDelivery>(); if ((erpReceiveDeliveryCasted != null)) { this._parent.ErpReceiveDelivery = erpReceiveDeliveryCasted; return; } } IMaterialItem materialItemsCasted = item.As <IMaterialItem>(); if ((materialItemsCasted != null)) { this._parent.MaterialItems.Add(materialItemsCasted); } IAsset assetsCasted = item.As <IAsset>(); if ((assetsCasted != null)) { this._parent.Assets.Add(assetsCasted); } }
/// <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) { IErpInvoiceLineItem erpInvoiceLineItemItem = item.As <IErpInvoiceLineItem>(); if (((erpInvoiceLineItemItem != null) && this._parent.ErpInvoices.Remove(erpInvoiceLineItemItem))) { return(true); } if ((this._parent.Market == item)) { this._parent.Market = 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) { IErpInvoiceLineItem erpInvoicesCasted = item.As <IErpInvoiceLineItem>(); if ((erpInvoicesCasted != null)) { this._parent.ErpInvoices.Add(erpInvoicesCasted); } if ((this._parent.Market == null)) { IMarket marketCasted = item.As <IMarket>(); if ((marketCasted != null)) { this._parent.Market = marketCasted; 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.ErpInvoiceLineItem == null)) { IErpInvoiceLineItem erpInvoiceLineItemCasted = item.As <IErpInvoiceLineItem>(); if ((erpInvoiceLineItemCasted != null)) { this._parent.ErpInvoiceLineItem = erpInvoiceLineItemCasted; return; } } IErpPayment erpPaymentsCasted = item.As <IErpPayment>(); if ((erpPaymentsCasted != null)) { this._parent.ErpPayments.Add(erpPaymentsCasted); } if ((this._parent.ErpPayable == null)) { IErpPayable erpPayableCasted = item.As <IErpPayable>(); if ((erpPayableCasted != null)) { this._parent.ErpPayable = erpPayableCasted; return; } } IErpJournalEntry erpJournalEntriesCasted = item.As <IErpJournalEntry>(); if ((erpJournalEntriesCasted != null)) { this._parent.ErpJournalEntries.Add(erpJournalEntriesCasted); } if ((this._parent.Status == null)) { IStatus statusCasted = item.As <IStatus>(); if ((statusCasted != null)) { this._parent.Status = statusCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IErpPayableLineItem erpPayableLineItemsCasted = item.As <IErpPayableLineItem>(); if ((erpPayableLineItemsCasted != null)) { this._parent.ErpPayableLineItems.Add(erpPayableLineItemsCasted); } IErpInvoiceLineItem erpInvoiceLineItemsCasted = item.As <IErpInvoiceLineItem>(); if ((erpInvoiceLineItemsCasted != null)) { this._parent.ErpInvoiceLineItems.Add(erpInvoiceLineItemsCasted); } IErpRecLineItem erpRecLineItemsCasted = item.As <IErpRecLineItem>(); if ((erpRecLineItemsCasted != null)) { this._parent.ErpRecLineItems.Add(erpRecLineItemsCasted); } }