コード例 #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)
            {
                IErpIssueInventory erpIssueInventoryItem = item.As <IErpIssueInventory>();

                if (((erpIssueInventoryItem != null) &&
                     this._parent.ErpIssueInventories.Remove(erpIssueInventoryItem)))
                {
                    return(true);
                }
                IErpReqLineItem erpReqLineItemItem = item.As <IErpReqLineItem>();

                if (((erpReqLineItemItem != null) &&
                     this._parent.ErpReqLineItems.Remove(erpReqLineItemItem)))
                {
                    return(true);
                }
                IMaterialItem materialItemItem = item.As <IMaterialItem>();

                if (((materialItemItem != null) &&
                     this._parent.MaterialItems.Remove(materialItemItem)))
                {
                    return(true);
                }
                ICUMaterialItem cUMaterialItemItem = item.As <ICUMaterialItem>();

                if (((cUMaterialItemItem != null) &&
                     this._parent.CUMaterialItems.Remove(cUMaterialItemItem)))
                {
                    return(true);
                }
                return(false);
            }
コード例 #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)
            {
                IErpIssueInventory erpIssueInventoriesCasted = item.As <IErpIssueInventory>();

                if ((erpIssueInventoriesCasted != null))
                {
                    this._parent.ErpIssueInventories.Add(erpIssueInventoriesCasted);
                }
                IErpReqLineItem erpReqLineItemsCasted = item.As <IErpReqLineItem>();

                if ((erpReqLineItemsCasted != null))
                {
                    this._parent.ErpReqLineItems.Add(erpReqLineItemsCasted);
                }
                IMaterialItem materialItemsCasted = item.As <IMaterialItem>();

                if ((materialItemsCasted != null))
                {
                    this._parent.MaterialItems.Add(materialItemsCasted);
                }
                ICUMaterialItem cUMaterialItemsCasted = item.As <ICUMaterialItem>();

                if ((cUMaterialItemsCasted != null))
                {
                    this._parent.CUMaterialItems.Add(cUMaterialItemsCasted);
                }
            }
コード例 #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)
            {
                IErpReqLineItem erpReqLineItemsCasted = item.As <IErpReqLineItem>();

                if ((erpReqLineItemsCasted != null))
                {
                    this._parent.ErpReqLineItems.Add(erpReqLineItemsCasted);
                }
            }
コード例 #4
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)
            {
                IErpReqLineItem erpReqLineItemItem = item.As <IErpReqLineItem>();

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