예제 #1
0
파일: Patient.cs 프로젝트: girish66/REM
        /// <summary>
        /// Removes the patient special need.
        /// </summary>
        /// <param name="patientSpecialNeed">The patient special need.</param>
        public virtual void RemovePatientSpecialNeed(PatientSpecialNeed patientSpecialNeed)
        {
            Check.IsNotNull(patientSpecialNeed, "patient special need is required.");

            _specialNeeds.Delete(patientSpecialNeed);
            NotifyItemRemoved(() => SpecialNeeds, patientSpecialNeed);
        }
예제 #2
0
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="patientSpecialNeed">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>
        public virtual bool ValuesEqual(PatientSpecialNeed patientSpecialNeed)
        {
            if (patientSpecialNeed == null)
            {
                return(false);
            }

            return(Equals(SpecialNeed, patientSpecialNeed.SpecialNeed));
        }
예제 #3
0
파일: Patient.cs 프로젝트: girish66/REM
        /// <summary>
        /// Adds the patient special need.
        /// </summary>
        /// <param name="patientSpecialNeed">The patient special need.</param>
        public virtual void AddPatientSpecialNeed(PatientSpecialNeed patientSpecialNeed)
        {
            Check.IsNotNull(patientSpecialNeed, "patient special need is required.");

            DomainRuleEngine.CreateRuleEngine <Patient, PatientSpecialNeed> (this, () => AddPatientSpecialNeed)
            .WithContext(patientSpecialNeed)
            .Execute(
                () =>
            {
                patientSpecialNeed.Patient = this;
                _specialNeeds.Add(patientSpecialNeed);
                NotifyItemAdded(() => SpecialNeeds, patientSpecialNeed);
            });
        }
예제 #4
0
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="patientSpecialNeed">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>         
        public virtual bool ValuesEqual( PatientSpecialNeed patientSpecialNeed )
        {
            if (patientSpecialNeed == null)
            {
                return false;
            }

            return Equals ( SpecialNeed, patientSpecialNeed.SpecialNeed );
        }
예제 #5
0
파일: Patient.cs 프로젝트: divyang4481/REM
        /// <summary>
        /// Removes the patient special need.
        /// </summary>
        /// <param name="patientSpecialNeed">The patient special need.</param>
        public virtual void RemovePatientSpecialNeed(PatientSpecialNeed patientSpecialNeed)
        {
            Check.IsNotNull(patientSpecialNeed, "patient special need is required.");

            _specialNeeds.Delete(patientSpecialNeed);
            NotifyItemRemoved(() => SpecialNeeds, patientSpecialNeed);
        }
예제 #6
0
파일: Patient.cs 프로젝트: divyang4481/REM
        /// <summary>
        /// Adds the patient special need.
        /// </summary>
        /// <param name="patientSpecialNeed">The patient special need.</param>
        public virtual void AddPatientSpecialNeed(PatientSpecialNeed patientSpecialNeed)
        {
            Check.IsNotNull(patientSpecialNeed, "patient special need is required.");

            DomainRuleEngine.CreateRuleEngine<Patient, PatientSpecialNeed> ( this, () => AddPatientSpecialNeed )
                .WithContext ( patientSpecialNeed )
                .Execute (
                    () =>
                        {
                            patientSpecialNeed.Patient = this;
                            _specialNeeds.Add ( patientSpecialNeed );
                            NotifyItemAdded ( () => SpecialNeeds, patientSpecialNeed );
                        } );
        }