/// <summary> /// Handles the WillChangeRecordset event of the underlying Recordset, triggering the control's WillChangeRecordset event. /// </summary> /// <param name="eventSender">The object which rises the event.</param> /// <param name="e">The arguments of the event.</param> void Recordset_WillChangeRecordset(object eventSender, RecordSetChangeEventArgs e) { EventStatusEnum status = e.Status; OnWillChangeRecordset(e.Reason, ref status); e.Status = status; }
/// <summary> /// OnWillChangeRecordset event is called before a pending operation changes the ADORecordsetHelper. /// </summary> /// <param name="reason">The reason of the change.</param> /// <param name="status">A EventStatusEnum value that indicates the state of the ADORecordsetHelper in the moment that the event rose.</param> protected void OnWillChangeRecordset(EventReasonEnum reason, ref EventStatusEnum status) { if (WillChangeRecordset != null) { RecordSetChangeEventArgs args = new RecordSetChangeEventArgs(reason, status); WillChangeRecordset(this, args); status = args.Status; } }