/// <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(AgencyContact other) { if (other == null) { return(false); } var valuesEqual = Equals(_agencyContactType, other.AgencyContactType) && Equals(_contactStaff, other.ContactStaff) && Equals(_effectiveStartDate, other.EffectiveStartDate) && Equals(_statusIndicator, other.StatusIndicator) && Equals(_alternativeContactIndicator, other.AlternativeContactIndicator); return(valuesEqual); }
/// <summary> /// Adds the contact. /// </summary> /// <param name="agencyContact"> /// The agency contact. /// </param> public virtual void AddContact(AgencyContact agencyContact) { Check.IsNotNull(agencyContact, "agencyContact is required."); DomainRuleEngine.CreateRuleEngine <Agency, AgencyContact> (this, () => AddContact) .WithContext(agencyContact) .Execute(() => { agencyContact.Agency = this; _agencyContacts.Add(agencyContact); NotifyItemAdded(() => AgencyContacts, agencyContact); }); }
/// <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(AgencyContact other) { if (other == null) { return false; } var valuesEqual = Equals(_agencyContactType, other.AgencyContactType) && Equals(_contactStaff, other.ContactStaff) && Equals(_effectiveStartDate, other.EffectiveStartDate) && Equals(_statusIndicator, other.StatusIndicator) && Equals(_alternativeContactIndicator, other.AlternativeContactIndicator); return valuesEqual; }
/// <summary> /// Removes the contacts. /// </summary> /// <param name="agencyContact"> /// The agency contact. /// </param> public virtual void RemoveContacts( AgencyContact agencyContact ) { _agencyContacts.Delete(agencyContact); NotifyItemRemoved ( () => AgencyContacts, agencyContact ); }
/// <summary> /// Adds the contact. /// </summary> /// <param name="agencyContact"> /// The agency contact. /// </param> public virtual void AddContact( AgencyContact agencyContact ) { Check.IsNotNull ( agencyContact, "agencyContact is required." ); DomainRuleEngine.CreateRuleEngine<Agency, AgencyContact> ( this, () => AddContact ) .WithContext ( agencyContact ) .Execute(() => { agencyContact.Agency = this; _agencyContacts.Add(agencyContact); NotifyItemAdded(() => AgencyContacts, agencyContact); }); }
/// <summary> /// Removes the contacts. /// </summary> /// <param name="agencyContact"> /// The agency contact. /// </param> public virtual void RemoveContacts(AgencyContact agencyContact) { _agencyContacts.Delete(agencyContact); NotifyItemRemoved(() => AgencyContacts, agencyContact); }