/// <summary> /// Handles the WillChangeRecord event of the underlying Recordset, triggering the control's WillChangeRecord event. /// </summary> /// <param name="eventSender">The object which rises the event.</param> /// <param name="e">The arguments of the event.</param> void Recordset_WillChangeRecord(object eventSender, RecordChangeEventArgs e) { EventStatusEnum status = e.Status; OnWillChangeRecord(e.Reason, ref status, e.NumberOfRecords); e.Status = status; }
/// <summary> /// The OnWillChangeRecord event is called before one or more records (rows) in the Recordset change. /// </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> /// <param name="numRecords">Value indicating the number of records changed (affected).</param> protected void OnWillChangeRecord(EventReasonEnum reason, ref EventStatusEnum status, int numRecords) { if (WillChangeRecord != null) { RecordChangeEventArgs args = new RecordChangeEventArgs(reason, numRecords, status); WillChangeRecord(this, args); status = args.Status; } }