IRdsParamsControl.Link

Fore Syntax

Link: IRdsLink;

Syntax

Link: Prognoz.Platform.Interop.Rds.IRdsLink;

Description

The Link property returns parent object.

Fore Example

Executing the example requires the MDM repository with the NSI_1 identifier that contains the MDM dictionary with the Dict_1 identifier and a form with the Button1 button placed on it. Add links to the Metabase, Dal and Rds system assemblies. The example is a handler of the OnClick event for the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Link: IRdsLink;
    Param: IRdsParam;
    ParamsControl: IRdsParamsControl;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace(
"Dict_1", MB.ItemById("NSI_1").Key).Edit;
    Dict := MObj 
As IRdsDictionary;
    Attrs := Dict.Attributes;
    Link := Dict.Links.FindByAttribute(Attrs.FindById("LINK_ATTRIBUTE"));
    Param := Link.Reference.Dictionary.Params.Item(0);
    ParamsControl := Link.ParamsControl;
    text:=ParamsControl.Link.Name;
End Sub Button1OnClick;

After executing the example, clicking the button displays the parent object name in the form title.

Fore.NET Example

Executing the example requires the MDM repository with the NSI_1 identifier that contains an MDM dictionary with the Dict_1 identifier and a form with the button1 button placed on it. Add links to the Dal and Rds system assemblies. The example is a handler of the Click event for the button.

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Rds;

...

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Link: IRdsLink;
    Param: IRdsParam;
    ParamsControl: IRdsParamsControl;
Begin
    MB := self.Metabase;
    MObj := MB.ItemByIdNamespace[
"Dict_1", MB.ItemById["NSI_1"].Key].Edit();
    Dict := MObj 
As IRdsDictionary;
    Attrs := Dict.Attributes;
    Link := Dict.Links.FindByAttribute(Attrs.FindById(
"LINK_ATTRIBUTE"));
    Param := Link.Reference.Dictionary.Params.Item[
0];
    ParamsControl := Link.ParamsControl;
    text:=ParamsControl.Link.Name;
End Sub;

After executing the example, clicking the button displays the parent object name in the form title.

See also:

IRdsParamsControl