/// <include file='doc\OleDbDataAdapter.uex' path='docs/doc[@for="OleDbDataAdapter.OnRowUpdating1"]/*' /> override protected void OnRowUpdating(RowUpdatingEventArgs value) { OleDbRowUpdatingEventHandler handler = (OleDbRowUpdatingEventHandler)Events[ADP.EventRowUpdating]; if ((null != handler) && (value is OleDbRowUpdatingEventArgs)) { handler(this, (OleDbRowUpdatingEventArgs)value); } }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// oledbrowupdatingeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this OleDbRowUpdatingEventHandler oledbrowupdatingeventhandler, Object sender, OleDbRowUpdatingEventArgs e, AsyncCallback callback) { if (oledbrowupdatingeventhandler == null) { throw new ArgumentNullException("oledbrowupdatingeventhandler"); } return(oledbrowupdatingeventhandler.BeginInvoke(sender, e, callback, null)); }
protected override void OnRowUpdating(RowUpdatingEventArgs value) { OleDbRowUpdatingEventHandler handler = (OleDbRowUpdatingEventHandler)base.Events[EventRowUpdating]; if ((handler != null) && (value is OleDbRowUpdatingEventArgs)) { handler(this, (OleDbRowUpdatingEventArgs)value); } base.OnRowUpdating(value); }
private void ClearHandlers() { if (null != this.adohandler) { ((OleDbDataAdapter)this.adapter).RowUpdating -= this.adohandler; this.adohandler = null; } else if (null != this.sqlhandler) { ((SqlDataAdapter)this.adapter).RowUpdating -= this.sqlhandler; this.sqlhandler = null; } else if (null != this.odbchandler) { ((OdbcDataAdapter)this.adapter).RowUpdating -= this.odbchandler; this.odbchandler = null; } }