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