/// <summary> /// Raises the <see cref="ColumnChanged" /> event. /// </summary> /// <param name="column">The <see cref="MercLocationColumn"/> which has raised the event.</param> /// <param name="value">The changed value.</param> public virtual void OnColumnChanged(MercLocationColumn column, object value) { if (!SuppressEntityEvents) { MercLocationEventHandler handler = ColumnChanged; if (handler != null) { handler(this, new MercLocationEventArgs(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="MercLocationColumn"/> which has raised the event.</param> /// <param name="value">The changed value.</param> public virtual void OnColumnChanging(MercLocationColumn column, object value) { if (IsEntityTracked && EntityState != EntityState.Added && !EntityManager.TrackChangedEntities) { EntityManager.StopTracking(entityTrackingKey); } if (!SuppressEntityEvents) { MercLocationEventHandler handler = ColumnChanging; if (handler != null) { handler(this, new MercLocationEventArgs(column, value)); } } }
/// <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(MercLocationColumn column) { switch (column) { case MercLocationColumn.Idx: return(entityData.Idx != _originalData.Idx); case MercLocationColumn.StkId: return(entityData.StkId != _originalData.StkId); case MercLocationColumn.LocId: return(entityData.LocId != _originalData.LocId); case MercLocationColumn.GoodsId: return(entityData.GoodsId != _originalData.GoodsId); case MercLocationColumn.Check: return(entityData.Check != _originalData.Check); default: return(false); } }
/// <summary> /// Initializes a new instance of the <see cref="T:MercLocationComparer"/> class. /// </summary> /// <param name="column">The column to sort on.</param> public MercLocationComparer(MercLocationColumn column) { this.whichComparison = column; }
///<summary> /// Initalizes a new Instance of the MercLocationEventArgs class. ///</summary> public MercLocationEventArgs(MercLocationColumn column, object value) { this.column = column; this.value = value; }
///<summary> /// Initalizes a new Instance of the MercLocationEventArgs class. ///</summary> public MercLocationEventArgs(MercLocationColumn column) { this.column = column; }
/// <summary> /// Raises the <see cref="ColumnChanged" /> event. /// </summary> /// <param name="column">The <see cref="MercLocationColumn"/> which has raised the event.</param> public virtual void OnColumnChanged(MercLocationColumn column) { OnColumnChanged(column, null); return; }