コード例 #1
0
ファイル: StaffLicense.cs プロジェクト: girish66/REM
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="staffLicense">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>
        public virtual bool ValuesEqual(StaffLicense staffLicense)
        {
            if (staffLicense == null)
            {
                return(false);
            }

            var valuesEqual =
                Equals(_license.Key, staffLicense._license.Key) &&
                Equals(_effectiveDateRange, staffLicense._effectiveDateRange);

            return(valuesEqual);
        }
コード例 #2
0
        /// <summary>
        /// The add license.
        /// </summary>
        /// <param name="license">
        /// The license.
        /// </param>
        public virtual void AddLicense(StaffLicense license)
        {
            Check.IsNotNull(license, "License is required.");

            DomainRuleEngine.CreateRuleEngine <Staff, StaffLicense> (this, () => AddLicense)
            .WithContext(license)
            .Execute(() =>
            {
                license.Staff = this;
                _licenses.Add(license);
                NotifyItemAdded(() => Licenses, license);
            });
        }
コード例 #3
0
ファイル: Staff.cs プロジェクト: divyang4481/REM
 /// <summary>
 /// Removes the license.
 /// </summary>
 /// <param name="license">
 /// The license.
 /// </param>
 public virtual void RemoveLicense( StaffLicense license )
 {
     _licenses.Remove ( license );
     NotifyItemRemoved ( () => Licenses, license );
 }
コード例 #4
0
ファイル: Staff.cs プロジェクト: divyang4481/REM
        /// <summary>
        /// The add license.
        /// </summary>
        /// <param name="license">
        /// The license.
        /// </param>
        public virtual void AddLicense( StaffLicense license )
        {
            Check.IsNotNull ( license, "License is required." );

            DomainRuleEngine.CreateRuleEngine<Staff, StaffLicense> ( this, () => AddLicense )
                .WithContext ( license )
                .Execute(() =>
                {
                    license.Staff = this;
                    _licenses.Add(license);
                    NotifyItemAdded(() => Licenses, license);
                });
        }
コード例 #5
0
ファイル: StaffLicense.cs プロジェクト: divyang4481/REM
        /// <summary>
        /// Determines if the values are equal.
        /// </summary>
        /// <param name="staffLicense">
        /// The other object.
        /// </param>
        /// <returns>
        /// A boolean denoting equality of the values.
        /// </returns>
        public virtual bool ValuesEqual(StaffLicense staffLicense)
        {
            if (staffLicense == null)
            {
                return false;
            }

            var valuesEqual =
                Equals(_license.Key, staffLicense._license.Key) &&
                Equals(_effectiveDateRange, staffLicense._effectiveDateRange);
            return valuesEqual;
        }
コード例 #6
0
 /// <summary>
 /// Removes the license.
 /// </summary>
 /// <param name="license">
 /// The license.
 /// </param>
 public virtual void RemoveLicense(StaffLicense license)
 {
     _licenses.Remove(license);
     NotifyItemRemoved(() => Licenses, license);
 }