It opens a standard dialog box that is used to set up user properties.
Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:
Value type | Description |
Element 1: IMetabaseSecurity | The repository security manager that is used to grant user permissions. |
Element 2: IMetabaseUser, ISecuritySubject |
The user, for whom it is necessary to open setup dialog box. |
None
To execute the example, make sure that the security manager contains the USER user.
Add links to the Metabase, Ui system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
MbSec: IMetabaseSecurity;
User: ISecuritySubject;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Data: Array;
Begin
MB := MetabaseClass.Active;
MbSec := MB.Security;
User := MbSec.ResolveName("USER");
Target := WinApplication.Instance.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext;
Data := New Variant[2];
Data[0] := MbSec;
Data[1] := User;
Context.Data := Data;
Target.Execute("ShowUserProp", Context);
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Ui;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
MbSec: IMetabaseSecurity;
User: ISecuritySubject;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Data: Array;
WinApp: WinApplicationClassClass;
Begin
MB := Params.Metabase;
MbSec := MB.Security;
User := MbSec.ResolveName("USER");
WinApp := New WinApplicationClassClass();
Target := WinApp.Instance[Null].GetPluginTarget("Adm");
Context := Target.CreateExecutionContext();
Data := New Object[2];
Data[0] := MbSec;
Data[1] := User;
Context.Data := Data;
Target.Execute("ShowUserProp", Context, Null);
End Sub;
After executing the example a dialog box to set up properties of the USER user opens.
See also: