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