Ejemplo n.º 1
0
 /// <summary>
 /// OnWillMove event is called before a pending operation changes the current position in 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 OnWillMove(EventReasonEnum reason, ref EventStatusEnum status)
 {
     if (WillMove != null)
     {
         MoveEventArgs args = new MoveEventArgs(reason, status);
         WillMove(this, args);
         status = args.Status;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles the WillMove event of the underlying Recordset, triggering the control's  WillMove event.
 /// </summary>
 /// <param name="eventSender">The object which rises the event.</param>
 /// <param name="e">The arguments of the event.</param>
 void Recordset_WillMove(object eventSender, MoveEventArgs e)
 {
     EventStatusEnum status = e.Status;
     OnWillMove(e.Reason, ref status);
     e.Status = status;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// OnWillMove event is called before a pending operation changes the current position in the ADORecordsetHelper.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="status">An EventStatusEnum value that indicates the state of the ADORecordsetHelper in the moment that the event rose.</param>
 protected void OnWillMove(EventReasonEnum reason, ref EventStatusEnum status)
 {
     firstChange = true;
     if (WillMove != null)
     {
         MoveEventArgs args = new MoveEventArgs(reason, status);
         WillMove(this, args);
         status = args.Status;
         firstChange = status == EventStatusEnum.adStatusCancel ? false : true;
     }
 }