Example #1
0
        /// <summary>
        /// Fires the Validation Event
        /// </summary>
        /// <returns></returns>
        public bool OnValidate()
        {
            if (this.Validate != null)
            {
                DataBindingValidationEventArgs Args = new DataBindingValidationEventArgs();
                Args.DataBindingItem = this;

                this.Validate(this, Args);

                if (!Args.IsValid)
                {
                    return(false);
                }
            }

            return(true);
        }
        /// <summary>
        /// Fires the Validation Event
        /// </summary>
        /// <returns></returns>
        public bool OnValidate()
        {
            if (this.Validate != null)
            {
                DataBindingValidationEventArgs Args = new DataBindingValidationEventArgs();
                Args.DataBindingItem = this;

                this.Validate(this, Args);

                if (!Args.IsValid)
                    return false;
            }

            return true;
        }