示例#1
0
 /// <summary>
 /// The remove contacts.
 /// </summary>
 /// <param name="contact">
 /// The contact.
 /// </param>
 public virtual void RemoveContacts(LocationContact contact)
 {
     _locationContacts.Delete(contact);
     NotifyItemRemoved(() => LocationContacts, contact);
 }
示例#2
0
 /// <summary>
 /// The remove contacts.
 /// </summary>
 /// <param name="contact">
 /// The contact.
 /// </param>
 public virtual void RemoveContacts(LocationContact contact)
 {
     _locationContacts.Delete(contact);
     NotifyItemRemoved(() => LocationContacts, contact);
 }
示例#3
0
        /// <summary>
        /// The add contact.
        /// </summary>
        /// <param name="locationContact">
        /// The location contact.
        /// </param>
        public virtual void AddContact(LocationContact locationContact)
        {
            Check.IsNotNull(locationContact, "locationContact is required.");

            DomainRuleEngine.CreateRuleEngine<Location, LocationContact> ( this, () => AddContact )
                .WithContext ( locationContact )
                .Execute(() =>
                {
                    locationContact.Location = this;
                    _locationContacts.Add(locationContact);
                    NotifyItemAdded(() => LocationContacts, locationContact);
                });
        }
示例#4
0
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="other">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>         
        public virtual bool ValuesEqual(LocationContact other)
        {
            if (other == null)
            {
                return false;
            }

            var valuesEqual = Equals(_locationContactType, other.LocationContactType) && Equals(_contactStaff, other.ContactStaff)
                              && Equals(_effectiveDateRange, other.EffectiveDateRange) && Equals(_statusIndicator, other.StatusIndicator)
                              && Equals(_alternativeContactIndicator, other.AlternativeContactIndicator);

            return valuesEqual;
        }