IAuditFilter.Top

Syntax

Top: Integer;

Top: integer;

Description

The Top property determines the number of observed records of the access protocol.

Comments

The property enables limiting the number of observed records of the access protocol, which speeds up working with it.

By default the property has 0 value.

If the values are 0 and -1, the list of access protocol records is unlimited, that is all records are observed.

Example

To execute the example, create a form, add a button with Button1 name, the IntegerEdit component with IntegerEdit1 name and the Memo component with Memo1 name, in IntegerEdit1 specify the required number of the access protocol records which must be displayed.

Add a link to the Metabase system assembly.

Sub ShowLog(log: IAuditLog);
Var
    opers: IAuditOperations;
Begin
    Memo1.Lines.Clear;
    opers := log.OpenOperations(-
1);
    
While Not opers.Eof Do
        Memo1.Lines.Add(opers.Name + 
"  " + opers.Stamp.ToString);
        opers.Next;
    
End While;
End Sub ShowLog;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    log: IAuditLog;
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    log := MetabaseClass.Active.Security.OpenAuditLog;
    log.Filter.Top := IntegerEdit1.Value;
    ShowLog(log);
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.ForeSystem;
Sub ShowLog(log: IAuditLog);
Var
    ALogon: IAuditLogons;
    opers: IAuditOperations;
Begin
    Alogon := log.OpenLogons(
False);
    opers := log.OpenOperations(-
1 As uinteger);
    
While Not opers.Eof() Do
        textbox1.Text := textbox1.Text + opers.Name + char.ConvertFromUtf32(
13) + char.ConvertFromUtf32(10);
        opers.Next();
    
End While;
End Sub ShowLog;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    log: IAuditLog;
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := Self.Metabase;
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    MS := MB.Security;
    textbox1.Clear();
    log := Self.Metabase.Security.OpenAuditLog();
    log.Filter.Top := numericUpDown1.Value 
As Integer;
    ShowLog(log);
End Sub;

On click the Button1 in the Memo1 field the list from the specified number of the last records of the access protocol appears.

See also:

IAuditFilter