LookupTableEventReceiver.OnCreated Method

A post-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)

Syntax

'Declaration
Public Overridable Sub OnCreated ( _
    contextInfo As PSContextInfo, _
    e As LookupTablePostEventArgs _
)
'Usage
Dim instance As LookupTableEventReceiver
Dim contextInfo As PSContextInfo
Dim e As LookupTablePostEventArgs

instance.OnCreated(contextInfo, e)
public virtual void OnCreated(
    PSContextInfo contextInfo,
    LookupTablePostEventArgs e
)

Parameters

Remarks

Note

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.

Examples

The following code shows examples of how to get data from different tables such as LookupTableLanguages, LookupTables, and LookupTableValues.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public class LookupTableEvents : LookupTableEventReceiver
{
    public override void OnCreating(PSLibrary.PSContextInfo contextInfo, 
        LookupTablePreEventArgs e)
    {
        int lutLanguage = 
            (int)e.LookupTableInformation.LookupTableLanguages.Rows[0]["LCID"];
        Guid lutMultiUid = 
            (Guid)e.LookupTableInformation.LookupTables.Rows[0]["LT_UID"];
        string lutMultiValue = 
            (string)e.LookupTableInformation.LookupTableValues.Rows[0]["LT_VALUE_TEXT"];
        . . .
    }

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.

See Also

Reference

LookupTableEventReceiver Class

LookupTableEventReceiver Members

Microsoft.Office.Project.Server.Events Namespace