コード例 #1
0
 /// <summary>
 /// The remove work hour.
 /// </summary>
 /// <param name="locationWorkHour">
 /// The location work hour.
 /// </param>
 public virtual void RemoveWorkHour(LocationWorkHour locationWorkHour)
 {
     if (_locationWorkHours.Remove(locationWorkHour))
     {
         NotifyItemRemoved(() => LocationWorkHours, locationWorkHour);
     }
 }
コード例 #2
0
        /// <summary>
        /// The add work hour.
        /// </summary>
        /// <param name="locationWorkHour">
        /// The location work hour.
        /// </param>
        public virtual void AddWorkHour(LocationWorkHour locationWorkHour)
        {
            Check.IsNotNull(locationWorkHour, "locationWorkHour is required.");

            DomainRuleEngine.CreateRuleEngine <LocationOperationSchedule, LocationWorkHour> (this, () => AddWorkHour)
            .WithContext(locationWorkHour)
            .Execute(() =>
            {
                locationWorkHour.LocationOperationSchedule = this;
                _locationWorkHours.Add(locationWorkHour);
                NotifyItemAdded(() => LocationWorkHours, locationWorkHour);
            });
        }
コード例 #3
0
 /// <summary>
 /// The remove work hour.
 /// </summary>
 /// <param name="locationWorkHour">
 /// The location work hour.
 /// </param>
 public virtual void RemoveWorkHour(LocationWorkHour locationWorkHour)
 {
     if (_locationWorkHours.Remove(locationWorkHour))
     {
         NotifyItemRemoved(() => LocationWorkHours, locationWorkHour);
     }
 }
コード例 #4
0
        /// <summary>
        /// The add work hour.
        /// </summary>
        /// <param name="locationWorkHour">
        /// The location work hour.
        /// </param>
        public virtual void AddWorkHour(LocationWorkHour locationWorkHour)
        {
            Check.IsNotNull ( locationWorkHour, "locationWorkHour is required." );

            DomainRuleEngine.CreateRuleEngine<LocationOperationSchedule, LocationWorkHour> ( this, () => AddWorkHour )
                .WithContext ( locationWorkHour )
                .Execute(() =>
                {
                    locationWorkHour.LocationOperationSchedule = this;
                    _locationWorkHours.Add(locationWorkHour);
                    NotifyItemAdded(() => LocationWorkHours, locationWorkHour);
                });
        }