コード例 #1
0
 /// <summary>
 /// Raises the UpdateObject event.
 /// </summary>
 internal void OnUpdateObject(UpdateObjectArgs e)
 {
     if (UpdateObject != null)
     {
         UpdateObject(this, e);
     }
 }
コード例 #2
0
        /// <summary>
        /// Implements the update behavior for
        /// the control by raising the
        /// <see cref="YYTDataSource.UpdateObject"/> event.
        /// </summary>
        /// <param name="keys">The key values from the UI
        /// that identify the object to be updated.</param>
        /// <param name="values">The values from
        /// the UI that are to be inserted.</param>
        /// <param name="oldValues">The old values
        /// from the UI.</param>
        /// <returns>The number of rows affected.</returns>
        protected override int ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
        {
            // tell the page to update the object
            UpdateObjectArgs args = new UpdateObjectArgs(keys, values, oldValues);

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