Export (0) Print
Expand All

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)

public virtual void OnCreated(
	PSContextInfo contextInfo,
	LookupTablePostEventArgs e
)

Parameters

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

Contains the Project Server context information.

e
Type: Microsoft.Office.Project.Server.Events.LookupTablePostEventArgs

The data for the event.

NoteNote

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 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.

Community Additions

ADD
Show:
© 2014 Microsoft