/// <summary> /// Raises the <see cref="ColumnChanged" /> event. /// </summary> /// <param name="column">The <see cref="BarcodeColumn"/> which has raised the event.</param> /// <param name="value">The changed value.</param> public virtual void OnColumnChanged(BarcodeColumn column, object value) { if (!SuppressEntityEvents) { BarcodeEventHandler handler = ColumnChanged; if (handler != null) { handler(this, new BarcodeEventArgs(column, value)); } // warn the parent list that i have changed OnEntityChanged(); } }
/// <summary> /// Raises the <see cref="ColumnChanging" /> event. /// </summary> /// <param name="column">The <see cref="BarcodeColumn"/> which has raised the event.</param> /// <param name="value">The changed value.</param> public virtual void OnColumnChanging(BarcodeColumn column, object value) { if (IsEntityTracked && EntityState != EntityState.Added && !EntityManager.TrackChangedEntities) { EntityManager.StopTracking(entityTrackingKey); } if (!SuppressEntityEvents) { BarcodeEventHandler handler = ColumnChanging; if (handler != null) { handler(this, new BarcodeEventArgs(column, value)); } } }
protected virtual void OnBarcodeEventHandler(BarcodeEventArgs e) { BarcodeEventHandler?.Invoke(this, e); }