Export (0) Print
Expand All

LookupTableEventReceiver.OnCreating method

A pre-event handler for the CreateLookupTables and CreateLookupTablesMultiLang methods.

Namespace:  Microsoft.Office.Project.Server.Events
Assembly:  Microsoft.Office.Project.Server.Events.Receivers (in Microsoft.Office.Project.Server.Events.Receivers.dll)

public virtual void OnCreating(
	PSContextInfo contextInfo,
	LookupTablePreEventArgs e


Type: Microsoft.Office.Project.Server.Library.PSContextInfo

Contains the Project Server context information.

Type: Microsoft.Office.Project.Server.Events.LookupTablePreEventArgs

The data for the event.


The pre- and post-events for both the CreateLookupTables and CreateLookupTablesMultiLang methods expose LookupTableMultiLangDataSet, rather than a LookupTableDataSet, in the e parameter of event handlers.

To use datasets in event handlers, set a reference to the Microsoft.Office.Project.Schema.dll assembly. For more information, see How to: Create a Project Server Event Handler and Log an Event.

For information about additional Report Data Service (RDS) events for changing lookup table data in the Reporting database, see Events for the RDB.

The following code fragment is a pre-event handler for CreateLookupTables that gets data from different tables in a LookupTableMultiLanguageDataSet.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public class LookupTableEvents : LookupTableEventReceiver
    public override void OnCreating(PSLibrary.PSContextInfo contextInfo, 
        LookupTablePreEventArgs e)
        int lutLanguage = 
        Guid lutMultiUid = 
        string lutMultiValue = 
        . . .
© 2015 Microsoft