Compartilhar via


LookupTableEventReceiver.OnCreating método

Um manipulador de eventos anteriores para os métodos CreateLookupTables e CreateLookupTablesMultiLang .

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

Sintaxe

'Declaração
Public Overridable Sub OnCreating ( _
    contextInfo As PSContextInfo, _
    e As LookupTablePreEventArgs _
)
'Uso
Dim instance As LookupTableEventReceiver
Dim contextInfo As PSContextInfo
Dim e As LookupTablePreEventArgs

instance.OnCreating(contextInfo, e)
public virtual void OnCreating(
    PSContextInfo contextInfo,
    LookupTablePreEventArgs e
)

Parâmetros

Comentários

Dica

A pré e pós-eventos para o CreateLookupTables e o CreateLookupTablesMultiLang de expõem métodos LookupTableMultiLangDataSet, em vez de um LookupTableDataSet, no parâmetro e de manipuladores de eventos.

Para usar datasets em manipuladores de eventos, defina uma referência ao assembly Microsoft.Office.Project.Schema.dll . Para obter mais informações, consulte How to: Create a Project Server Event Handler and Log an Event.

Para obter informações sobre eventos adicionais de relatório Data Service (RDS) para alterar os dados da tabela de pesquisa no banco de dados de relatórios, consulte eventos de RDB.

Exemplos

O seguinte fragmento de código é um manipulador de Pre-eventos CreateLookupTables que obtém dados de diferentes tabelas em um LookupTableMultiLanguageDataSet.

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"];
        . . .
}

Ver também

Referência

LookupTableEventReceiver classe

LookupTableEventReceiver membros

Microsoft.Office.Project.Server.Events namespace