ParamDescription(Index: Integer): String;
ParamDescription[Index: System.Int32] : System.String;
Index. Index of a parameter of security module.
The ParamDescription property returns a description of security module parameter.
To execute an example create a form, put components on it: a button with the Button1 identifier and a multiline text editor with the Memo1 identifier. Add links to the Metabase, Dal, Db system assemblies. It is supposed that the repository contains a database with the DATA identifier.
The example is a handler of the OnClick event for a button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
DB: IDatabaseInstance;
SC: ISecurityConnection;
S: ISecurityPackageLogonDataEx;
i: integer;
Begin
MB := MetabaseClass.Active;
DB := MB.ItemById("DATA").Open(Null) As IDatabaseInstance;
SC := DB.Connection;
S := SC.LogonData As ISecurityPackageLogonDataEx;
For i := 0 To s.ParamCountEx-1 Do
memo1.Lines.Add(s.ParamDescription(i) + " " + s.IsRequired(i).ToString);
End For;
End Sub Button1OnClick;
On clicking the button a description of security module parameters and a possibility to use connections with privileges for them are displayed into text editor.
To execute an example create a form, put components on it: a button with the Button1 identifier and a multiline list with the ListBox1 identifier. Add links to the Dal, Db system assemblies. It is supposed that the repository contains a database with the DATA identifier.
The example is a handler of the Click event for a button.
...
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Db;
...
Private Sub button1_Click( sender : System.Object; e : System.EventArgs );
Var
MB: IMetabase;
DB: IDatabaseInstance;
SC: ISecurityConnection;
S: ISecurityPackageLogonDataEx;
i: integer;
Begin
MB := Self.Metabase;
DB := MB.ItemById["DATA"].Open(Null) As IDatabaseInstance;
SC := DB.Connection;
S := SC.LogonData As ISecurityPackageLogonDataEx;
For i := 0 To S.ParamCountEx-1 Do
ListBox1.Items.Add(S.ParamDescription[i] + " " + s.IsRequired[i].ToString());
End For;
End Sub;
On clicking the button a description of security module parameters and a possibility to use connections with privileges for them are displayed into a list.
See also: