/// <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.BankAccount == null)) { IBankAccount bankAccountCasted = item.As <IBankAccount>(); if ((bankAccountCasted != null)) { this._parent.BankAccount = bankAccountCasted; return; } } if ((this._parent.MerchantAccount == null)) { IMerchantAccount merchantAccountCasted = item.As <IMerchantAccount>(); if ((merchantAccountCasted != null)) { this._parent.MerchantAccount = merchantAccountCasted; return; } } if ((this._parent.Vendor == null)) { IVendor vendorCasted = item.As <IVendor>(); if ((vendorCasted != null)) { this._parent.Vendor = vendorCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IReceipt receiptsCasted = item.As <IReceipt>(); if ((receiptsCasted != null)) { this._parent.Receipts.Add(receiptsCasted); } if ((this._parent.Vendor == null)) { IVendor vendorCasted = item.As <IVendor>(); if ((vendorCasted != null)) { this._parent.Vendor = vendorCasted; return; } } ITransaction transactionsCasted = item.As <ITransaction>(); if ((transactionsCasted != null)) { this._parent.Transactions.Add(transactionsCasted); } if ((this._parent.MerchantAccount == null)) { IMerchantAccount merchantAccountCasted = item.As <IMerchantAccount>(); if ((merchantAccountCasted != null)) { this._parent.MerchantAccount = merchantAccountCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IMerchantAccount merchantAccountsCasted = item.As <IMerchantAccount>(); if ((merchantAccountsCasted != null)) { this._parent.MerchantAccounts.Add(merchantAccountsCasted); } }
/// <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) { IMerchantAccount merchantAccountItem = item.As <IMerchantAccount>(); if (((merchantAccountItem != null) && this._parent.MerchantAccounts.Remove(merchantAccountItem))) { 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) { IPointOfSale pointOfSalesCasted = item.As <IPointOfSale>(); if ((pointOfSalesCasted != null)) { this._parent.PointOfSales.Add(pointOfSalesCasted); } ICashier cashiersCasted = item.As <ICashier>(); if ((cashiersCasted != null)) { this._parent.Cashiers.Add(cashiersCasted); } if ((this._parent.MerchantAccount == null)) { IMerchantAccount merchantAccountCasted = item.As <IMerchantAccount>(); if ((merchantAccountCasted != null)) { this._parent.MerchantAccount = merchantAccountCasted; return; } } IBankStatement bankStatementsCasted = item.As <IBankStatement>(); if ((bankStatementsCasted != null)) { this._parent.BankStatements.Add(bankStatementsCasted); } IVendorShift vendorShiftsCasted = item.As <IVendorShift>(); if ((vendorShiftsCasted != null)) { this._parent.VendorShifts.Add(vendorShiftsCasted); } }