/// <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); }
/// <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); }); }
/// <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> /// 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); }); }
/// <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; }