Exemple #1
0
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="staffCollegeDegree">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>
        public virtual bool ValuesEqual(StaffCollegeDegree staffCollegeDegree)
        {
            if (staffCollegeDegree == null)
            {
                return(false);
            }

            var valuesEqual = Equals(_collegeDegree.Key, staffCollegeDegree._collegeDegree.Key) &&
                              Equals(_earnedDate, staffCollegeDegree._earnedDate);

            return(valuesEqual);
        }
Exemple #2
0
        /// <summary>
        /// Add college degree.
        /// </summary>
        /// <param name="collegeDegree">
        /// The college degree.
        /// </param>
        public virtual void AddCollegeDegree(StaffCollegeDegree collegeDegree)
        {
            Check.IsNotNull(collegeDegree, "CollegeDegree is required.");

            DomainRuleEngine.CreateRuleEngine <Staff, StaffCollegeDegree> (this, () => AddCollegeDegree)
            .WithContext(collegeDegree)
            .Execute(() =>
            {
                collegeDegree.Staff = this;
                _collegeDegrees.Add(collegeDegree);
                NotifyItemAdded(() => CollegeDegrees, collegeDegree);
            });
        }
Exemple #3
0
 /// <summary>
 /// Removes the college degree.
 /// </summary>
 /// <param name="collegeDegree">
 /// The college degree.
 /// </param>
 public virtual void RemoveCollegeDegree( StaffCollegeDegree collegeDegree )
 {
     Check.IsNotNull ( collegeDegree, "CollegeDegree is required." );
     _collegeDegrees.Remove ( collegeDegree );
     NotifyItemRemoved ( () => Certifications, collegeDegree );
 }
Exemple #4
0
        /// <summary>
        /// Add college degree.
        /// </summary>
        /// <param name="collegeDegree">
        /// The college degree.
        /// </param>
        public virtual void AddCollegeDegree( StaffCollegeDegree collegeDegree )
        {
            Check.IsNotNull ( collegeDegree, "CollegeDegree is required." );

            DomainRuleEngine.CreateRuleEngine<Staff, StaffCollegeDegree> ( this, () => AddCollegeDegree )
                .WithContext ( collegeDegree )
                .Execute(() =>
                {
                    collegeDegree.Staff = this;
                    _collegeDegrees.Add(collegeDegree);
                    NotifyItemAdded(() => CollegeDegrees, collegeDegree);
                });
        }
Exemple #5
0
 /// <summary>
 /// Removes the college degree.
 /// </summary>
 /// <param name="collegeDegree">
 /// The college degree.
 /// </param>
 public virtual void RemoveCollegeDegree(StaffCollegeDegree collegeDegree)
 {
     Check.IsNotNull(collegeDegree, "CollegeDegree is required.");
     _collegeDegrees.Remove(collegeDegree);
     NotifyItemRemoved(() => Certifications, collegeDegree);
 }
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="staffCollegeDegree">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>
        public virtual bool ValuesEqual( StaffCollegeDegree staffCollegeDegree )
        {
            if ( staffCollegeDegree == null )
            {
                return false;
            }

            var valuesEqual = Equals ( _collegeDegree.Key, staffCollegeDegree._collegeDegree.Key )
                              && Equals ( _earnedDate, staffCollegeDegree._earnedDate );
            return valuesEqual;
        }