Exemple #1
0
        /// <summary>
        /// Raises the <see cref="ColumnChanged" /> event.
        /// </summary>
        /// <param name="column">The <see cref="AwBuildVersionColumn"/> which has raised the event.</param>
        /// <param name="value">The changed value.</param>
        public virtual void OnColumnChanged(AwBuildVersionColumn column, object value)
        {
            if (!SuppressEntityEvents)
            {
                AwBuildVersionEventHandler handler = ColumnChanged;
                if (handler != null)
                {
                    handler(this, new AwBuildVersionEventArgs(column, value));
                }

                // warn the parent list that i have changed
                OnEntityChanged();
            }
        }
Exemple #2
0
        /// <summary>
        /// Raises the <see cref="ColumnChanging" /> event.
        /// </summary>
        /// <param name="column">The <see cref="AwBuildVersionColumn"/> which has raised the event.</param>
        /// <param name="value">The changed value.</param>
        public virtual void OnColumnChanging(AwBuildVersionColumn column, object value)
        {
            if (IsEntityTracked && EntityState != EntityState.Added && !EntityManager.TrackChangedEntities)
            {
                EntityManager.StopTracking(entityTrackingKey);
            }

            if (!SuppressEntityEvents)
            {
                AwBuildVersionEventHandler handler = ColumnChanging;
                if (handler != null)
                {
                    handler(this, new AwBuildVersionEventArgs(column, value));
                }
            }
        }
Exemple #3
0
        /// <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(AwBuildVersionColumn column)
        {
            switch (column)
            {
            case AwBuildVersionColumn.SystemInformationId:
                return(entityData.SystemInformationId != _originalData.SystemInformationId);

            case AwBuildVersionColumn.DatabaseVersion:
                return(entityData.DatabaseVersion != _originalData.DatabaseVersion);

            case AwBuildVersionColumn.VersionDate:
                return(entityData.VersionDate != _originalData.VersionDate);

            case AwBuildVersionColumn.ModifiedDate:
                return(entityData.ModifiedDate != _originalData.ModifiedDate);

            default:
                return(false);
            }
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:AwBuildVersionComparer"/> class.
 /// </summary>
 /// <param name="column">The column to sort on.</param>
 public AwBuildVersionComparer(AwBuildVersionColumn column)
 {
     this.whichComparison = column;
 }
Exemple #5
0
 ///<summary>
 /// Initalizes a new Instance of the AwBuildVersionEventArgs class.
 ///</summary>
 public AwBuildVersionEventArgs(AwBuildVersionColumn column, object value)
 {
     this.column = column;
     this.value  = value;
 }
Exemple #6
0
 ///<summary>
 /// Initalizes a new Instance of the AwBuildVersionEventArgs class.
 ///</summary>
 public AwBuildVersionEventArgs(AwBuildVersionColumn column)
 {
     this.column = column;
 }
Exemple #7
0
 /// <summary>
 /// Raises the <see cref="ColumnChanged" /> event.
 /// </summary>
 /// <param name="column">The <see cref="AwBuildVersionColumn"/> which has raised the event.</param>
 public virtual void OnColumnChanged(AwBuildVersionColumn column)
 {
     OnColumnChanged(column, null);
     return;
 }