コード例 #1
0
ファイル: ADODataControlHelper.cs プロジェクト: xxdoc/SKS
 /// <summary>
 /// OnRecordsetChangeComplete event is called after the ADORecordsetHelper has changed.
 /// </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="errors">Array containing all the errors occurred during the field change.</param>
 protected void OnRecordsetChangeComplete(EventReasonEnum reason, ref EventStatusEnum status, string[] errors)
 {
     if (RecordsetChangeComplete != null)
     {
         RecordSetChangeCompleteEventArgs args = new RecordSetChangeCompleteEventArgs(reason, errors, status);
         RecordsetChangeComplete(this, args);
         status = args.Status;
     }
 }
コード例 #2
0
ファイル: ADODataControlHelper.cs プロジェクト: xxdoc/SKS
 /// <summary>
 /// OnMoveComplete event is called after the current position in the ADORecordsetHelper changes.
 /// </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="errors">Array containing all the errors occurred during the field change.</param>
 protected void OnMoveComplete(EventReasonEnum reason, ref EventStatusEnum status, string[] errors)
 {
     if (MoveComplete != null)
     {
         MoveCompleteEventArgs args = new MoveCompleteEventArgs(reason, errors, status);
         MoveComplete(this, args);
         status = args.Status;
     }
 }
コード例 #3
0
ファイル: ADODataControlHelper.cs プロジェクト: xxdoc/SKS
 /// <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;
     }
 }
コード例 #4
0
ファイル: ADODataControlHelper.cs プロジェクト: xxdoc/SKS
 /// <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;
     }
 }
コード例 #5
0
ファイル: ADODataControlHelper.cs プロジェクト: xxdoc/SKS
 /// <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;
     }
 }
コード例 #6
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordSetChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 protected RecordSetChangeEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(status, errors)
 {
     this.reason = reason;
 }
コード例 #7
0
        /// <summary>
        /// Move the current record according to the value of “records”.
        /// </summary>
        /// <param name="records">The number of records to move forward (if positive), backwards (if negative).</param>
        /// <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>
        private void Move(int records, EventReasonEnum reason, EventStatusEnum status)
        {            
			//if ((!UsingView && Tables[0].Rows.Count == 0) || (UsingView && currentView.Count == 0))
			//{
			//	throw new InvalidOperationException("Requested operation requires a current record");
			//}
            OnWillMove(reason, ref status);
            string[] errors = null;
            if (status != EventStatusEnum.adStatusCancel)
            {
                try
                {
                    if (records != 0 && index >= 0)
                    {
                        Update(false);
                    }
                    BasicMove(index + records);
                    if (eof && reason != EventReasonEnum.adRsnMoveFirst && reason != EventReasonEnum.adRsnMovePrevious)
                    {
                        EndOfRecordsetLogic();
                    }
                    //else
                    //{
                    //    eof = false;
                    //}
                }
                catch (Exception e)
                {
                    errors = new string[] { e.Message };
                    status = EventStatusEnum.adStatusErrorsOccurred;
                }
                OnMoveComplete(reason, ref status, errors);
            }
        }
コード例 #8
0
 /// <summary>
 /// Creates a new MoveEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the move.</param>
 /// <param name="status">The status of the event.</param>
 public MoveEventArgs(EventReasonEnum reason, EventStatusEnum status)
     : this(reason, null, status)
 {
 }
コード例 #9
0
 /// <summary>
 /// Creates a new RecordSetChangeCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public RecordSetChangeCompleteEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(reason, errors, status)
 {
 }
コード例 #10
0
 /// <summary>
 /// Creates a new RecordChangeCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public RecordChangeCompleteEventArgs(EventReasonEnum reason, int numberOfRecords, string[] errors, EventStatusEnum status)
     : base(reason, numberOfRecords, errors, status)
 {
 }
コード例 #11
0
 /// <summary>
 /// OnMoveComplete event is called after the current position in the ADORecordsetHelper changes.
 /// </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="errors">Array containing all the errors occurred during the field change.</param>
 protected void OnMoveComplete(EventReasonEnum reason, ref EventStatusEnum status, string[] errors)
 {
     if (MoveComplete != null)
     {
         MoveCompleteEventArgs args = new MoveCompleteEventArgs(reason, errors, status);
         MoveComplete(this, args);
         status = args.Status;
     }
 }
コード例 #12
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new MoveCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the move.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public MoveCompleteEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(reason, errors, status)
 {
 }
コード例 #13
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;
     }
 }
コード例 #14
0
 /// <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;
     }
 }
コード例 #15
0
 /// <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;
     }
 }
コード例 #16
0
 /// <summary>
 /// OnRecordsetChangeComplete event is called after the ADORecordsetHelper has changed.
 /// </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="errors">Array containing all the errors occurred during the field change.</param>
 protected void OnRecordsetChangeComplete(EventReasonEnum reason, ref EventStatusEnum status, string[] errors)
 {
     if (RecordsetChangeComplete != null)
     {
         RecordSetChangeCompleteEventArgs args = new RecordSetChangeCompleteEventArgs(reason, errors, status);
         RecordsetChangeComplete(this, args);
         status = args.Status;
     }
 }
コード例 #17
0
 /// <summary>
 /// Creates a new RecordChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 protected RecordChangeEventArgs(EventReasonEnum reason, int numberOfRecords, string[] errors, EventStatusEnum status)
     : base(status, errors)
 {
     this.reason          = reason;
     this.numberOfRecords = numberOfRecords;
 }
コード例 #18
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new MoveEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the move.</param>
 /// <param name="status">The status of the event.</param>
 public MoveEventArgs(EventReasonEnum reason, EventStatusEnum status)
     : this(reason, null, status)
 {
 }
コード例 #19
0
 /// <summary>
 /// Move the current record to the beginning of the ADORecordsetHelper object.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 private void MoveFirst(EventReasonEnum reason)
 {
     if (index == -1)
     {
         index = 0;
     }
     Move((-1 * index), reason, EventStatusEnum.adStatusOK);
 }
コード例 #20
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordChangeCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public RecordChangeCompleteEventArgs(EventReasonEnum reason, int numberOfRecords, string[] errors, EventStatusEnum status)
     : base(reason, numberOfRecords, errors, status)
 {
 }
コード例 #21
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="status">The status of the event.</param>
 public RecordChangeEventArgs(EventReasonEnum reason, int numberOfRecords, EventStatusEnum status)
     : this(reason, numberOfRecords, null, status)
 {
 }
コード例 #22
0
 /// <summary>
 /// Creates a new RecordChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="status">The status of the event.</param>
 public RecordChangeEventArgs(EventReasonEnum reason, int numberOfRecords, EventStatusEnum status)
     : this(reason, numberOfRecords, null, status)
 {
 }
コード例 #23
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="numberOfRecords">The number of fields affected.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 protected RecordChangeEventArgs(EventReasonEnum reason, int numberOfRecords, string[] errors, EventStatusEnum status)
     : base(status, errors)
 {
     this.reason = reason;
     this.numberOfRecords = numberOfRecords;
 }
コード例 #24
0
 /// <summary>
 /// Creates a new RecordSetChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="status">The status of the event.</param>
 public RecordSetChangeEventArgs(EventReasonEnum reason, EventStatusEnum status)
     : this(reason, null, status)
 {
 }
コード例 #25
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordSetChangeCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public RecordSetChangeCompleteEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(reason, errors, status)
 {
 }
コード例 #26
0
 /// <summary>
 /// Creates a new MoveEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the move.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 protected MoveEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(status, errors)
 {
     this.reason = reason;
 }
コード例 #27
0
ファイル: AdoEvents.cs プロジェクト: WebMAPTestUser/SKS
 /// <summary>
 /// Creates a new RecordSetChangeEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the change.</param>
 /// <param name="status">The status of the event.</param>
 public RecordSetChangeEventArgs(EventReasonEnum reason, EventStatusEnum status)
     : this(reason, null, status)
 {
 }
コード例 #28
0
 /// <summary>
 /// Creates a new MoveCompleteEventArgs instance.
 /// </summary>
 /// <param name="reason">The reason of the move.</param>
 /// <param name="errors">The errors ocurred during the operation.</param>
 /// <param name="status">The status of the event.</param>
 public MoveCompleteEventArgs(EventReasonEnum reason, string[] errors, EventStatusEnum status)
     : base(reason, errors, status)
 {
 }
コード例 #29
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;
     }
 }