Пример #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(AgencyFrequentlyAskedQuestion other)
        {
            if (other == null)
            {
                return(false);
            }

            var valuesEqual = Equals(_questionNote, other.QuestionNote) && Equals(_answerNote, other.AnswerNote);

            return(valuesEqual);
        }
Пример #2
0
        /// <summary>
        /// Adds the frequently asked question.
        /// </summary>
        /// <param name="agencyFrequentlyAskedQuestion">
        /// The agency frequently asked question.
        /// </param>
        public virtual void AddFrequentlyAskedQuestion(AgencyFrequentlyAskedQuestion agencyFrequentlyAskedQuestion)
        {
            Check.IsNotNull(agencyFrequentlyAskedQuestion, "agencyFrequentlyAskedQuestion is required.");

            DomainRuleEngine.CreateRuleEngine <Agency, AgencyFrequentlyAskedQuestion> (this, () => AddFrequentlyAskedQuestion)
            .WithContext(agencyFrequentlyAskedQuestion)
            .Execute(() =>
            {
                agencyFrequentlyAskedQuestion.Agency = this;
                _agencyFrequentlyAskedQuestions.Add(agencyFrequentlyAskedQuestion);
                NotifyItemAdded(() => AgencyFrequentlyAskedQuestions, agencyFrequentlyAskedQuestion);
            });
        }
Пример #3
0
 /// <summary>
 /// Removes the frequently asked question.
 /// </summary>
 /// <param name="frequentlyAskedQuestion">
 /// The frequently asked question.
 /// </param>
 public virtual void RemoveFrequentlyAskedQuestion( AgencyFrequentlyAskedQuestion frequentlyAskedQuestion )
 {
     _agencyFrequentlyAskedQuestions.Delete(frequentlyAskedQuestion);
     NotifyItemRemoved ( () => AgencyFrequentlyAskedQuestions, frequentlyAskedQuestion );
 }
Пример #4
0
        /// <summary>
        /// Adds the frequently asked question.
        /// </summary>
        /// <param name="agencyFrequentlyAskedQuestion">
        /// The agency frequently asked question.
        /// </param>
        public virtual void AddFrequentlyAskedQuestion( AgencyFrequentlyAskedQuestion agencyFrequentlyAskedQuestion )
        {
            Check.IsNotNull ( agencyFrequentlyAskedQuestion, "agencyFrequentlyAskedQuestion is required." );

            DomainRuleEngine.CreateRuleEngine<Agency, AgencyFrequentlyAskedQuestion> ( this, () => AddFrequentlyAskedQuestion )
                .WithContext ( agencyFrequentlyAskedQuestion )
                .Execute(() =>
                {
                    agencyFrequentlyAskedQuestion.Agency = this;
                    _agencyFrequentlyAskedQuestions.Add(agencyFrequentlyAskedQuestion);
                    NotifyItemAdded(() => AgencyFrequentlyAskedQuestions, agencyFrequentlyAskedQuestion);
                });
        }
Пример #5
0
 /// <summary>
 /// Removes the frequently asked question.
 /// </summary>
 /// <param name="frequentlyAskedQuestion">
 /// The frequently asked question.
 /// </param>
 public virtual void RemoveFrequentlyAskedQuestion(AgencyFrequentlyAskedQuestion frequentlyAskedQuestion)
 {
     _agencyFrequentlyAskedQuestions.Delete(frequentlyAskedQuestion);
     NotifyItemRemoved(() => AgencyFrequentlyAskedQuestions, frequentlyAskedQuestion);
 }
        /// <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(AgencyFrequentlyAskedQuestion other)
        {
            if (other == null)
            {
                return false;
            }

            var valuesEqual = Equals(_questionNote, other.QuestionNote) && Equals(_answerNote, other.AnswerNote);

            return valuesEqual;
        }