IMetabaseObjectDescriptor.GetCheckOutInfo

Syntax

GetCheckOutInfo: IObjectCheckOutInfo;

GetCheckOutInfo(): Prognoz.Platform.Interop.Metabase.IObjectCheckOutInfo;

Description

The GetCheckOutInfo method returns information about the object lockings.

Example

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

Add links to the Metabase, Ui system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    Info: IObjectCheckOutInfo;
    UserInfo: IObjectCheckOutInfoUser;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById("Report_11");
    Info := MDesc.GetCheckOutInfo;
    For Each UserInfo In Info Do
        Debug.Write("User: " + UserInfo.UserName);
        Debug.Write("; Station: " + UserInfo.MachineName);
        Debug.Write("; Locking date and time: " + UserInfo.Stamp.ToString);
        Debug.WriteLine("; Comments: " + UserInfo.Comment);
    End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Ui;
 
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    Info: IObjectCheckOutInfo;
    UserInfo: IObjectCheckOutInfoUser;
Begin
    MB := Params.Metabase;
    MDesc := MB.ItemById[
"Report_11"];
    Info := MDesc.GetCheckOutInfo();
    
For Each UserInfo In Info Do
        System.Diagnostics.Debug.Write(
"User: " + UserInfo.UserName);
        System.Diagnostics.Debug.Write(
"; Station: " + UserInfo.MachineName);
        System.Diagnostics.Debug.Write(
"; Locking date and time: " + UserInfo.Stamp.ToString());
        System.Diagnostics.Debug.WriteLine(
"; Comment: " + UserInfo.Comment);
    
End For;
End Sub;

After executing this example the information about the lockings of the Report_11 object is displayed in the development environment console.

See also:

IMetabaseObjectDescriptor