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

                // warn the parent list that i have changed
                OnEntityChanged();
            }
        }
Esempio n. 2
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(EvlUsertypeColumn column)
        {
            switch (column)
            {
            case EvlUsertypeColumn.Id:
                return(entityData.Id != _originalData.Id);

            case EvlUsertypeColumn.UserType:
                return(entityData.UserType != _originalData.UserType);

            default:
                return(false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Raises the <see cref="ColumnChanging" /> event.
        /// </summary>
        /// <param name="column">The <see cref="EvlUsertypeColumn"/> which has raised the event.</param>
        /// <param name="value">The changed value.</param>
        public virtual void OnColumnChanging(EvlUsertypeColumn column, object value)
        {
            if (IsEntityTracked && EntityState != EntityState.Added && !EntityManager.TrackChangedEntities)
            {
                EntityManager.StopTracking(entityTrackingKey);
            }

            if (!SuppressEntityEvents)
            {
                EvlUsertypeEventHandler handler = ColumnChanging;
                if (handler != null)
                {
                    handler(this, new EvlUsertypeEventArgs(column, value));
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:EvlUsertypeComparer"/> class.
 /// </summary>
 /// <param name="column">The column to sort on.</param>
 public EvlUsertypeComparer(EvlUsertypeColumn column)
 {
     this.whichComparison = column;
 }
Esempio n. 5
0
 ///<summary>
 /// Initalizes a new Instance of the EvlUsertypeEventArgs class.
 ///</summary>
 public EvlUsertypeEventArgs(EvlUsertypeColumn column, object value)
 {
     this.column = column;
     this.value  = value;
 }
Esempio n. 6
0
 ///<summary>
 /// Initalizes a new Instance of the EvlUsertypeEventArgs class.
 ///</summary>
 public EvlUsertypeEventArgs(EvlUsertypeColumn column)
 {
     this.column = column;
 }
Esempio n. 7
0
 /// <summary>
 /// Raises the <see cref="ColumnChanged" /> event.
 /// </summary>
 /// <param name="column">The <see cref="EvlUsertypeColumn"/> which has raised the event.</param>
 public virtual void OnColumnChanged(EvlUsertypeColumn column)
 {
     OnColumnChanged(column, null);
     return;
 }