예제 #1
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(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);
        }
예제 #2
0
        /// <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);
            });
        }
예제 #3
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(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;
        }
예제 #4
0
파일: Agency.cs 프로젝트: divyang4481/REM
 /// <summary>
 /// Removes the contacts.
 /// </summary>
 /// <param name="agencyContact">
 /// The agency contact.
 /// </param>
 public virtual void RemoveContacts( AgencyContact agencyContact )
 {
     _agencyContacts.Delete(agencyContact);
     NotifyItemRemoved ( () => AgencyContacts, agencyContact );
 }
예제 #5
0
파일: Agency.cs 프로젝트: divyang4481/REM
        /// <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);
                });
        }
예제 #6
0
 /// <summary>
 /// Removes the contacts.
 /// </summary>
 /// <param name="agencyContact">
 /// The agency contact.
 /// </param>
 public virtual void RemoveContacts(AgencyContact agencyContact)
 {
     _agencyContacts.Delete(agencyContact);
     NotifyItemRemoved(() => AgencyContacts, agencyContact);
 }