Stamp: Double;
Stamp: double;
The Stamp property returns date and time of operation. The date is viewed in the system format of dates.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
Operat: IAuditOperations;
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);
Operat:=Al.OpenOperations(ALogon.Session);
// Display date and time of the last operation to the console
Debug.WriteLine(DateTime.FromDouble(Operat.Stamp).ToString);
// 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;
Operat: IAuditOperations;
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);
Operat:=Al.OpenOperations(ALogon.Session);
// Display date and time of the last operation to the console
System.Diagnostics.Debug.WriteLine(DateTime.FromOADate(Operat.Stamp).ToString());
// Check in license
Lic := Null;
End Sub;
After executing the example, the console will display date and time of the last operation.
See also: