예제 #1
0
        public override void SaveContent(FilterEntry.FilterItemDate filterItem)
        {
            base.SaveContent(filterItem);

            if (DateTimeFunctionsEnabled)
            {
                filterItem.Enabled     = this.enabledCheckBox.Checked;
                filterItem.From        = this.dateTimeFrom.Value;
                filterItem.To          = this.dateTimeTo.Value;
                filterItem.FromEnabled = this.dateTimeFromCheckBox.Checked;
                filterItem.ToEnabled   = this.dateTimeToCheckBox.Checked;
            }
        }
예제 #2
0
        protected override void InternalLoadContent(FilterEntry.FilterItemDate filterItem)
        {
            this.filterItem = filterItem;

            if (DateTimeFunctionsEnabled)
            {
                this.dateTimeTo.ValueChanged   -= this.dateTime_ValueChanged;
                this.dateTimeFrom.ValueChanged -= this.dateTime_ValueChanged;

                this.enabledCheckBox.Checked      = filterItem.Enabled;
                this.dateTimeFrom.Value           = filterItem.From == DateTime.MinValue ? DateTime.Now : filterItem.From;
                this.dateTimeTo.Value             = filterItem.To == DateTime.MinValue ? DateTime.Now : filterItem.To;
                this.dateTimeFromCheckBox.Checked = filterItem.FromEnabled;
                this.dateTimeToCheckBox.Checked   = filterItem.ToEnabled;
                this.SetEnabledState();

                this.dateTimeTo.ValueChanged   += new System.EventHandler(this.dateTime_ValueChanged);
                this.dateTimeFrom.ValueChanged += new System.EventHandler(this.dateTime_ValueChanged);
            }
        }