Example #1
0
 /// <summary>
 /// Adds the Phone Number.
 /// </summary>
 /// <param name="phone">The phone number.</param>
 public virtual void AddPhoneNumber( BillingOfficePhone phone )
 {
     Check.IsNotNull ( phone, "Phone number is required." );
     phone.BillingOffice = this;
     _phoneNumbers.Add ( phone );
     NotifyItemAdded ( () => PhoneNumbers, phone );
 }
Example #2
0
 /// <summary>
 /// Removes the phone number.
 /// </summary>
 /// <param name="phone">The phone number.</param>
 public virtual void RemovePhoneNumber( BillingOfficePhone phone )
 {
     Check.IsNotNull ( phone, "Phone number is required." );
     _phoneNumbers.Remove ( phone );
     NotifyItemRemoved ( () => PhoneNumbers, phone );
 }
Example #3
0
        /// <summary>
        /// Valueses the equal.
        /// </summary>
        /// <param name="billingOfficePhone">The billing office phone.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        public virtual bool ValuesEqual( BillingOfficePhone billingOfficePhone )
        {
            if ( billingOfficePhone == null )
            {
                return false;
            }

            bool valuesEqual =
                Equals ( BillingOfficePhoneType.Key, billingOfficePhone.BillingOfficePhoneType.Key ) &&
                Equals ( Phone, billingOfficePhone.Phone );

            return valuesEqual;
        }