Пример #1
0
 /// <summary>
 /// Raises the DeleteObject event.
 /// </summary>
 internal void OnDeleteObject(DeleteObjectArgs e)
 {
     if (DeleteObject != null)
     {
         DeleteObject(this, e);
     }
 }
Пример #2
0
        /// <summary>
        /// Implements the delete behavior for
        /// the control by raising the
        /// <see cref="YYTDataSource.DeleteObject"/> event.
        /// </summary>
        /// <param name="keys">The key values from
        /// the UI that are to be deleted.</param>
        /// <param name="oldValues">The old values
        /// from the UI.</param>
        /// <returns>The number of rows affected.</returns>
        protected override int ExecuteDelete(IDictionary keys, IDictionary oldValues)
        {
            // tell the page to delete the object
            DeleteObjectArgs args = new DeleteObjectArgs(keys, oldValues);

            _owner.OnDeleteObject(args);
            return(args.RowsAffected);
        }