Stamp: Double;
Stamp: System.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 links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
Operat: IAuditOperations;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out 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.Metabase;
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;
// Check out 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: