Exemplo n.º 1
0
            /// <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);
            }
Exemplo n.º 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)
            {
                IContractorItem contractorItemsCasted = item.As <IContractorItem>();

                if ((contractorItemsCasted != null))
                {
                    this._parent.ContractorItems.Add(contractorItemsCasted);
                }
                IErpPayableLineItem erpPayableLineItemsCasted = item.As <IErpPayableLineItem>();

                if ((erpPayableLineItemsCasted != null))
                {
                    this._parent.ErpPayableLineItems.Add(erpPayableLineItemsCasted);
                }
            }
Exemplo n.º 3
0
            /// <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)
            {
                IContractorItem contractorItemItem = item.As <IContractorItem>();

                if (((contractorItemItem != null) &&
                     this._parent.ContractorItems.Remove(contractorItemItem)))
                {
                    return(true);
                }
                IErpPayableLineItem erpPayableLineItemItem = item.As <IErpPayableLineItem>();

                if (((erpPayableLineItemItem != null) &&
                     this._parent.ErpPayableLineItems.Remove(erpPayableLineItemItem)))
                {
                    return(true);
                }
                return(false);
            }
Exemplo n.º 4
0
            /// <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);
                }
            }