internal static void StatementCompletedHandler(object Sender, StatementCompletedEventArgs EventInfo) { _RowsAffected += EventInfo.RecordCount; return; }
private static void SMECustContactCon_StatementCompleted( object sender, StatementCompletedEventArgs e) { if (e.RecordCount <= 0) { Console.WriteLine("error " + e); } }
void SelectCommand_StatementCompleted(object sender, StatementCompletedEventArgs e) { MessageBox.Show("Select Command Complete Flag Fired: " + Environment.NewLine + "Recored Count: " + e.RecordCount); }
void SelectCommand_StatementCompleted(object sender, StatementCompletedEventArgs e) { MessageBox.Show(String.Format("Select Command Complete Flag Fired: {0}Recored Count: {1}", Environment.NewLine, e.RecordCount)); }
static void cmd_StatementCompleted(object sender, StatementCompletedEventArgs e) { if (sender is SqlCommand && _ActiveCommands.Contains((SqlCommand)sender)) { lock (_ActiveCommandsLock) { _ActiveCommands.Remove((SqlCommand)sender); ((SqlCommand)sender).Dispose(); } } }
/// <summary> /// event function for statement completed /// </summary> /// protected void Bind_SqlCommand_StatementCompleted(object sender, StatementCompletedEventArgs e) { if (e.RecordCount == 0) { errMsg = "<p class=\"errorText\">There are no valid events to show.</p>"; ErrorMsg.Text = errMsg; DefaultHeader.Visible = true; RegistrationRepeater.Visible = false; } }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// statementcompletedeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this StatementCompletedEventHandler statementcompletedeventhandler, Object sender, StatementCompletedEventArgs e, AsyncCallback callback) { if(statementcompletedeventhandler == null) throw new ArgumentNullException("statementcompletedeventhandler"); return statementcompletedeventhandler.BeginInvoke(sender, e, callback, null); }