/// <summary> /// Handles the WillChangeField event of the underlying Recordset, triggering the control's WillChangeField event. /// </summary> /// <param name="eventSender">The object which rises the event.</param> /// <param name="e">The arguments of the event.</param> void Recordset_WillChangeField(object eventSender, FieldChangeEventArgs e) { EventStatusEnum status = e.Status; OnWillChangeField(ref status, e.NumberOfFields, e.FieldValues); e.Status = status; }
/// <summary> /// The WillChangeField event is called before a pending operation changes the value of one or more Field objects in the ADORecordsetHelper. /// </summary> /// <param name="status">A EventStatusEnum value that indicates the state of the ADORecordsetHelper in the moment that the event rose.</param> /// <param name="numfields">Indicates the number of fields objects contained in the “fieldvalues” array.</param> /// <param name="fieldvalues">Array with the new values of the modified fields.</param> protected void OnWillChangeField(ref EventStatusEnum status, int numfields, object[] fieldvalues) { if (WillChangeField != null) { FieldChangeEventArgs args = new FieldChangeEventArgs(numfields, fieldvalues, status); WillChangeField(this, args); status = args.Status; } }