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

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

            if (!SuppressEntityEvents)
            {
                VuCatogaryManagerEventHandler handler = ColumnChanging;
                if (handler != null)
                {
                    handler(this, new VuCatogaryManagerEventArgs(column, value));
                }
            }
        }
Exemplo n.º 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(VuCatogaryManagerColumn column)
        {
            switch (column)
            {
            case VuCatogaryManagerColumn.Id:
                return(entityData.Id != _originalData.Id);

            case VuCatogaryManagerColumn.CatogaryId:
                return(entityData.CatogaryId != _originalData.CatogaryId);

            case VuCatogaryManagerColumn.Owner:
                return(entityData.Owner != _originalData.Owner);

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