IMetabaseObjectDescriptor.GetChangesHistory

Fore Syntax

GetChangesHistory(Start: DateTime; End_: DateTime): IAuditOperations;

Fore.NET Syntax

GetChangesHistory(Start: DateTime; @End: DateTime): Prognoz.Platform.Interop.Metabase.IAuditOperations;

Parameters

Start. Start date.

End. End date.

Description

The GetChangesHistory method returns collection of access protocol records containing information about actions made with objects during specified period of time.

Fore Example

Executing the example requires that the repository contains an object with the Obj_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    Operations: IAuditOperations;
    Start, End_: DateTime;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById("Obj_1");
    End_ := DateTime.Now;
    Start := DateTime.AddDays(End_, -10);
    Operations := MDesc.GetChangesHistory(Start, End_);
    While Not Operations.Eof Do
        Debug.WriteLine(Operations.Name + " " + Operations.Logon.UserName);
        Operations.Next;
    End While;
End Sub UserProc;

Executing the example returns access protocol records containing list of actions with the specified object for the last ten days. The name of actions and users who made them are displayed to the development environment console.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    Operations: IAuditOperations;
    Start, @End: DateTime;
Begin
    MB := Params.Metabase;
    MDesc := MB.ItemById["Obj_1"];
    @End := DateTime.Now;
    Start := @End.AddDays(-10);
    Operations := MDesc.GetChangesHistory(Start, @End);
    While Not Operations.Eof() Do
        System.Diagnostics.Debug.WriteLine(Operations.Name + " " + Operations.Logon.UserName);
        Operations.Next();
    End While;
End Sub;

See also:

IMetabaseObjectDescriptor