private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args) { // make sure we are still to proceed if (args.Status != UpdateStatus.Continue) { return; } if (_schema == null) { GenerateSchema(); } if (StatementType.Delete == args.StatementType) { args.Command = CreateDeleteCommand(); } else if (StatementType.Update == args.StatementType) { args.Command = CreateUpdateCommand(); } else if (StatementType.Insert == args.StatementType) { args.Command = CreateInsertCommand(); } else if (StatementType.Select == args.StatementType) { return; } SetParameterValues(args.Command, args.Row); }
private void RowUpdating(object sender, MySqlRowUpdatingEventArgs args) { RowUpdatingHandler(args); if (args.StatementType != StatementType.Insert) { return; } if (ReturnGeneratedIdentifiers) { if (args.Command.UpdatedRowSource != UpdateRowSource.None) { throw new InvalidOperationException( Resources.MixingUpdatedRowSource); } args.Command.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord; if (finalSelect == null) { CreateFinalSelect(); } } args.Command.CommandText += finalSelect; }
private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs e) { if ((int)e.Status != 0) { return; } if (this._schema == null) { this.GenerateSchema(); } if ((StatementType)3 == e.StatementType) { e.Command = this.CreateDeleteCommand(); } else if ((StatementType)2 == e.StatementType) { e.Command = this.CreateUpdateCommand(); } else if ((StatementType)1 == e.StatementType) { e.Command = this.CreateInsertCommand(); } else if ((int)e.StatementType == 0) { return; } MySqlCommandBuilder.SetParameterValues(e.Command, e.Row); }
protected override void OnRowUpdating(RowUpdatingEventArgs value) { MySqlRowUpdatingEventArgs mySqlRowUpdatingEventArgs = value as MySqlRowUpdatingEventArgs; MySqlRowUpdatingEventHandler mySqlRowUpdatingEventHandler = (MySqlRowUpdatingEventHandler)base.Events[MySqlDataAdapter.EventRowUpdating]; if (mySqlRowUpdatingEventHandler != null && mySqlRowUpdatingEventArgs != null) { mySqlRowUpdatingEventHandler(this, mySqlRowUpdatingEventArgs); } }
/// <summary> /// Overridden. Raises the RowUpdating event. /// </summary> /// <param name="value">A MySqlRowUpdatingEventArgs that contains the event data.</param> override protected void OnRowUpdating(RowUpdatingEventArgs value) { MySqlRowUpdatingEventArgs margs = (value as MySqlRowUpdatingEventArgs); // if (args.StatementType == StatementType.Insert) // FixupStatementDefaults(args); MySqlRowUpdatingEventHandler handler = (MySqlRowUpdatingEventHandler)Events[EventRowUpdating]; if ((null != handler) && (margs != null)) { handler(this, margs); } }
private void RowUpdating(object sender, MySqlRowUpdatingEventArgs args) { base.RowUpdatingHandler(args); }
private void RowUpdating(object sender, MySqlRowUpdatingEventArgs args) { base.RowUpdatingHandler(args); }
private void RowUpdating(object sender, MySqlRowUpdatingEventArgs args) { base.RowUpdatingHandler(args); if (args.StatementType != StatementType.Insert) return; if (ReturnGeneratedIdentifiers) { if (args.Command.UpdatedRowSource != UpdateRowSource.None) throw new InvalidOperationException( Resources.MixingUpdatedRowSource); args.Command.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord; if (finalSelect == null) CreateFinalSelect(); } if (finalSelect != null && finalSelect.Length > 0) args.Command.CommandText += finalSelect; }
void DataAdapter_RowUpdating( object sender, MySqlRowUpdatingEventArgs e ) { }
/// <summary> /// Handles the RowUpdating event /// </summary> /// <param name="obj">The object that published the event</param> /// <param name="e">The OleDbRowUpdatingEventArgs</param> protected void RowUpdating(object obj, MySqlRowUpdatingEventArgs e) { base.RowUpdating(obj, e); }