Example #1
0
        /// <summary>
        /// Fire the DateRangeChanging event
        /// </summary>
        /// <param name="e"></param>
        private void OnChanging(DateRangeChangingEventArgs e)
        {
            EventHandler <DateRangeChangingEventArgs> handler = this.Changing;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        /// <summary>
        /// DateRangeChanging event notification
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Item_Changing(object sender, DateRangeChangingEventArgs e)
        {
            DateRangeHelper item = sender as DateRangeHelper;

            if (item != null)
            {
                if (!IsValid(e.Start, e.End))
                {
                    throw new ArgumentOutOfRangeException("DateTime Item out of range");
                }
            }
        }