/// <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>
        /// Determines whether the property value has changed from the original data.
        /// </summary>
        /// <param name="column">The column.</param>
        /// <returns>
        ///     <c>true</c> if the property value has changed; otherwise, <c>false</c>.
        /// </returns>
        public bool IsPropertyChanged(BarcodeColumn column)
        {
            switch (column)
            {
            case BarcodeColumn.Barcode:
                return(entityData.Barcode != _originalData.Barcode);

            case BarcodeColumn.GoodsId:
                return(entityData.GoodsId != _originalData.GoodsId);

            default:
                return(false);
            }
        }
        /// <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));
                }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:BarcodeComparer"/> class.
 /// </summary>
 /// <param name="column">The column to sort on.</param>
 public BarcodeComparer(BarcodeColumn column)
 {
     this.whichComparison = column;
 }
 ///<summary>
 /// Initalizes a new Instance of the BarcodeEventArgs class.
 ///</summary>
 public BarcodeEventArgs(BarcodeColumn column, object value)
 {
     this.column = column;
     this.value  = value;
 }
 ///<summary>
 /// Initalizes a new Instance of the BarcodeEventArgs class.
 ///</summary>
 public BarcodeEventArgs(BarcodeColumn column)
 {
     this.column = column;
 }
 /// <summary>
 /// Raises the <see cref="ColumnChanged" /> event.
 /// </summary>
 /// <param name="column">The <see cref="BarcodeColumn"/> which has raised the event.</param>
 public virtual void OnColumnChanged(BarcodeColumn column)
 {
     OnColumnChanged(column, null);
     return;
 }