Ejemplo n.º 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.PassTroughBill == null))
                {
                    IPassThroughBill passTroughBillCasted = item.As <IPassThroughBill>();
                    if ((passTroughBillCasted != null))
                    {
                        this._parent.PassTroughBill = passTroughBillCasted;
                        return;
                    }
                }
                IChargeProfileData chargeProfileDataCasted = item.As <IChargeProfileData>();

                if ((chargeProfileDataCasted != null))
                {
                    this._parent.ChargeProfileData.Add(chargeProfileDataCasted);
                }
                if ((this._parent.BillDeterminant == null))
                {
                    IBillDeterminant billDeterminantCasted = item.As <IBillDeterminant>();
                    if ((billDeterminantCasted != null))
                    {
                        this._parent.BillDeterminant = billDeterminantCasted;
                        return;
                    }
                }
            }
Ejemplo n.º 2
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)
            {
                if ((this._parent.PassTroughBill == item))
                {
                    this._parent.PassTroughBill = null;
                    return(true);
                }
                IChargeProfileData chargeProfileDataItem = item.As <IChargeProfileData>();

                if (((chargeProfileDataItem != null) &&
                     this._parent.ChargeProfileData.Remove(chargeProfileDataItem)))
                {
                    return(true);
                }
                if ((this._parent.BillDeterminant == item))
                {
                    this._parent.BillDeterminant = null;
                    return(true);
                }
                return(false);
            }
Ejemplo 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)
            {
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.UserAttributes.Remove(userAttributeItem)))
                {
                    return(true);
                }
                IChargeProfileData chargeProfileDataItem = item.As <IChargeProfileData>();

                if (((chargeProfileDataItem != null) &&
                     this._parent.ChargeProfileData.Remove(chargeProfileDataItem)))
                {
                    return(true);
                }
                if ((this._parent.ChargeProfile == item))
                {
                    this._parent.ChargeProfile = null;
                    return(true);
                }
                return(false);
            }
Ejemplo 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)
            {
                IUserAttribute userAttributesCasted = item.As <IUserAttribute>();

                if ((userAttributesCasted != null))
                {
                    this._parent.UserAttributes.Add(userAttributesCasted);
                }
                IChargeProfileData chargeProfileDataCasted = item.As <IChargeProfileData>();

                if ((chargeProfileDataCasted != null))
                {
                    this._parent.ChargeProfileData.Add(chargeProfileDataCasted);
                }
                if ((this._parent.ChargeProfile == null))
                {
                    IChargeProfile chargeProfileCasted = item.As <IChargeProfile>();
                    if ((chargeProfileCasted != null))
                    {
                        this._parent.ChargeProfile = chargeProfileCasted;
                        return;
                    }
                }
            }