IAuditLogons.Stamp

Syntax

Stamp: Double;

Stamp: double;

Description

The Stamp property returns date and time of the entry into the repository.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AL: IAuditLog;
    ALogon: IAuditLogons;
    d, d1: DateTime;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Open access protocol
    Al := MS.OpenAuditLog;
    ALogon := AL.OpenLogons(
False);
    
// Display to console information about current repository sessions
    While Not ALogon.Eof Do
        Debug.Write(
"Session: " + ALogon.Session.ToString + " | ");
        
d := DateTime.FromDouble(ALogon.Stamp);
        d1 := DateTime.FromDouble(ALogon.StampOut);
        Debug.WriteLine(d.ToString + 
"-" + d1.ToString);
        ALogon.Next;
    
End While;
    
// Check in license
    Lic := Null;
End Sub UserProc;

Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AL: IAuditLog;
    ALogon: IAuditLogons;
    d, d1: DateTime;
    Lic: Object;
Begin
    MB := Params.Metabase;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    MS := MB.Security;
    
// Open access protocol
    Al := MS.OpenAuditLog();
    ALogon := AL.OpenLogons(
False);
    
// Display to console information about current repository sessions
    While Not ALogon.Eof() Do
        System.Diagnostics.Debug.Write(
"Session: " + ALogon.Session.ToString() + " | ");
        d := DateTime.FromOADate(ALogon.Stamp);
        d1 := DateTime.FromOADate(ALogon.StampOut);
        System.Diagnostics.Debug.WriteLine(d.ToString() + 
"-" + d1.ToString());
        ALogon.Next();
    
End While;
    
// Check in license
    Lic := Null;
End Sub;

After executing the example the information about the sessions with the current repository is displayed in the development environment console. A number of the session and start and finish dates of the session are also displayed.

See also:

IAuditLogons