예제 #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
파일: Agency.cs 프로젝트: divyang4481/REM
 /// <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
파일: Agency.cs 프로젝트: divyang4481/REM
        /// <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;
        }