.NET Customisation
User Guide
.NET Customisation
:
Database Interface
:
Events
: General Capture of DB Changes
General Capture of DB Changes
DBlayer maintains a change list of Database changes. Users can subscribe to this list of changes.
The list of changes is encapsulated in the DbUserChanges class. The DbUserChanges class has methods to determine what changes have been made, for example: elements created or deleted or modified.
The delegates are:
public
delegate
void ChangeEventHandler(DbUserChanges changes);
To add a subscriber (handler), the method is:
public
static
void
AddChangeEventHandler(ChangeDelegate plug)
This will be in the DbEvents class.
The subscribers receive a DbUserChanges class instance which has a list of elements changed and what the changes are.
The events are fired as follows:
•
At the end of running in a PML macro
•
After the execution of an AVEVA module specific command on the command line
•
When any action on a form has completed.
The event will only be fired if database changes have been made.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.