AutolockPeriod : Integer;
AutolockPeriod : integer;
The AutoLockPeriod property determines period in days on the expiry of which user accounts are automatically blocked.
Default value is 0, there are no blockings.
Executing the example requires a form with the IntegerEdit component with the IntegerEdit1 identifier and the Button component with the Button1 identifier.
Add links to the Metabase system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Security: IMetabaseSecurity;
Policy: IMetabasePolicy;
Begin
MB := MetabaseClass.Active;
Security := MB.Security;
Policy := Security.Policy;
Policy.AutoLockPeriod := IntegerEdit1.Value;
Security.Apply;
End Sub Button1OnClick;
After executing clicking the button sets the period in days specified in the IntegerEdit component.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Metabase;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
Security: IMetabaseSecurity;
Policy: IMetabasePolicy;
Begin
MB := Self.Metabase;
Security := MB.Security;
Policy := Security.Policy;
Policy.AutoLockPeriod := decimal.ToInt32(numericUpDown1.Value);
Security.Apply();
End Sub;
See also: