Exemple #1
0
        /// <summary>
        /// Raises the <see cref="ColumnChanged" /> event.
        /// </summary>
        /// <param name="column">The <see cref="TestIssue117TableaColumn"/> which has raised the event.</param>
        /// <param name="value">The changed value.</param>
        public virtual void OnColumnChanged(TestIssue117TableaColumn column, object value)
        {
            if (!SuppressEntityEvents)
            {
                TestIssue117TableaEventHandler handler = ColumnChanged;
                if (handler != null)
                {
                    handler(this, new TestIssue117TableaEventArgs(column, value));
                }

                // warn the parent list that i have changed
                OnEntityChanged();
            }
        }
Exemple #2
0
        /// <summary>
        /// Raises the <see cref="ColumnChanging" /> event.
        /// </summary>
        /// <param name="column">The <see cref="TestIssue117TableaColumn"/> which has raised the event.</param>
        /// <param name="value">The changed value.</param>
        public virtual void OnColumnChanging(TestIssue117TableaColumn column, object value)
        {
            if (IsEntityTracked && EntityState != EntityState.Added && !EntityManager.TrackChangedEntities)
            {
                EntityManager.StopTracking(entityTrackingKey);
            }

            if (!SuppressEntityEvents)
            {
                TestIssue117TableaEventHandler handler = ColumnChanging;
                if (handler != null)
                {
                    handler(this, new TestIssue117TableaEventArgs(column, value));
                }
            }
        }