示例#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);
 }