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)
            {
                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);
            }
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)
            {
                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;
                    }
                }
            }
Exemplo n.º 3
0
            /// <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);
                }
            }
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)
            {
                IErpQuoteLineItem erpQuoteLineItemsCasted = item.As <IErpQuoteLineItem>();

                if ((erpQuoteLineItemsCasted != null))
                {
                    this._parent.ErpQuoteLineItems.Add(erpQuoteLineItemsCasted);
                }
            }
Exemplo n.º 5
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)
            {
                IErpQuoteLineItem erpQuoteLineItemItem = item.As <IErpQuoteLineItem>();

                if (((erpQuoteLineItemItem != null) &&
                     this._parent.ErpQuoteLineItems.Remove(erpQuoteLineItemItem)))
                {
                    return(true);
                }
                return(false);
            }