Exemple #1
0
        private void OnChanging(CalendarDateRangeChangingEventArgs e)
        {
            EventHandler <CalendarDateRangeChangingEventArgs> handler = this.Changing;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
        /// <summary>
        /// Reject date range changes that would make the blackout dates collection invalid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Item_Changing(object sender, CalendarDateRangeChangingEventArgs e)
        {
            CalendarDateRange item = sender as CalendarDateRange;

            if (item != null)
            {
                if (!IsValid(e.Start, e.End))
                {
                    throw new ArgumentOutOfRangeException(SR.Get(SRID.Calendar_UnSelectableDates));
                }
            }
        }
        /// <summary>
        /// Reject date range changes that would make the blackout dates collection invalid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Item_Changing(object sender, CalendarDateRangeChangingEventArgs e)
        {
            CalendarDateRange item = sender as CalendarDateRange;

            if (item != null)
            {
                if (!IsValid(e.Start, e.End))
                {
                    throw new ArgumentOutOfRangeException("Value is not valid.");
                }
            }
        }
 private void OnChanging(CalendarDateRangeChangingEventArgs e)
 {
     EventHandler<CalendarDateRangeChangingEventArgs> handler = this.Changing;
     if (handler != null)
     {
         handler(this, e);
     }
 }