Beispiel #1
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.StreetAddress == null))
                {
                    IStreetAddress streetAddressCasted = item.As <IStreetAddress>();
                    if ((streetAddressCasted != null))
                    {
                        this._parent.StreetAddress = streetAddressCasted;
                        return;
                    }
                }
                if ((this._parent.ElectronicAddress == null))
                {
                    IElectronicAddress electronicAddressCasted = item.As <IElectronicAddress>();
                    if ((electronicAddressCasted != null))
                    {
                        this._parent.ElectronicAddress = electronicAddressCasted;
                        return;
                    }
                }
                if ((this._parent.PostalAddress == null))
                {
                    IPostalAddress postalAddressCasted = item.As <IPostalAddress>();
                    if ((postalAddressCasted != null))
                    {
                        this._parent.PostalAddress = postalAddressCasted;
                        return;
                    }
                }
                if ((this._parent.Phone1 == null))
                {
                    ITelephoneNumber phone1Casted = item.As <ITelephoneNumber>();
                    if ((phone1Casted != null))
                    {
                        this._parent.Phone1 = phone1Casted;
                        return;
                    }
                }
                if ((this._parent.Phone2 == null))
                {
                    ITelephoneNumber phone2Casted = item.As <ITelephoneNumber>();
                    if ((phone2Casted != null))
                    {
                        this._parent.Phone2 = phone2Casted;
                        return;
                    }
                }
                IMarketRole marketRolesCasted = item.As <IMarketRole>();

                if ((marketRolesCasted != null))
                {
                    this._parent.MarketRoles.Add(marketRolesCasted);
                }
                IBusinessRole businessRolesCasted = item.As <IBusinessRole>();

                if ((businessRolesCasted != null))
                {
                    this._parent.BusinessRoles.Add(businessRolesCasted);
                }
            }
Beispiel #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)
            {
                ICashierShift cashierShiftsCasted = item.As <ICashierShift>();

                if ((cashierShiftsCasted != null))
                {
                    this._parent.CashierShifts.Add(cashierShiftsCasted);
                }
                if ((this._parent.ElectronicAddress == null))
                {
                    IElectronicAddress electronicAddressCasted = item.As <IElectronicAddress>();
                    if ((electronicAddressCasted != null))
                    {
                        this._parent.ElectronicAddress = electronicAddressCasted;
                        return;
                    }
                }
                if ((this._parent.Vendor == null))
                {
                    IVendor vendorCasted = item.As <IVendor>();
                    if ((vendorCasted != null))
                    {
                        this._parent.Vendor = vendorCasted;
                        return;
                    }
                }
            }