Exemplo n.º 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);
        }
Exemplo n.º 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);
            });
        }
Exemplo n.º 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 );
 }
Exemplo n.º 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);
                });
        }
Exemplo n.º 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;
        }