Пример #1
0
 private void Adapter_RowUpdated(object sender, FbRowUpdatedEventArgs e)
 {
     if (ActOnRowUpdated == null)
     {
         return;
     }
     ActOnRowUpdated();
 }
Пример #2
0
        /// <summary>
        /// Gets the DbDataAdapter with the given update behavior and connection from the proper derived class.
        /// </summary>
        /// <param name="updateBehavior">
        /// <para>One of the <see cref="UpdateBehavior"/> values.</para>
        /// </param>
        /// <returns>A <see cref="DbDataAdapter"/>.</returns>
        /// <seealso cref="DbDataAdapter"/>
        //protected override DbDataAdapter GetDataAdapter(UpdateBehavior updateBehavior)
        //{
        //    DbDataAdapter adapter = base.DbProviderFactory.CreateDataAdapter();

        //    this.SetUpRowUpdatedEvent(adapter);

        //    return adapter;
        //}

        /// <devdoc>
        /// Listens for the RowUpdate event on a dataadapter to support UpdateBehavior.Continue
        /// </devdoc>
        private void OnSqlRowUpdated(object sender, FbRowUpdatedEventArgs e)
        {
            if (e.RecordsAffected == 0)
            {
                if (e.Errors != null)
                {
                    //e.Row.RowError = Resources.ExceptionMessageUpdateDataSetRowFailure;
                    e.Row.RowError = e.Errors.Message;
                    e.Status       = UpdateStatus.SkipCurrentRow;
                }
            }
        }