Reset;
Reset();
The Reset method resets binding of all parameters of a parametric dictionary.
To get settings of parameters binding, use the IRdsLink.ParamsControl property.
Executing the example requires an MDM repository with the NSI_LINK identifier that contains an MDM dictionary with the DICT identifier. The dictionary must have an added attribute for connection with parametric dictionary and configured binding of attribute to parameter of other dictionary. The example of creating such a dictionary is given in description of the IRdsLink.ParamsControl property.
Add links to the Metabase, Rds system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Attrs: IRdsAttributes;
Link: IRdsLink;
Param: IRdsParam;
ParamsControl: IRdsParamsControl;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemByIdNamespace("DICT", MB.ItemById("NSI_LINK").Key).Edit;
Dict := MObj As IRdsDictionary;
Attrs := Dict.Attributes;
Link := Dict.Links.FindByAttribute(Attrs.FindById("LINKATTR"));
Param := Link.Reference.Dictionary.Params.Item(0);
ParamsControl := Link.ParamsControl;
ParamsControl.Reset;
MObj.Save;
End Sub UserProc;
After executing the example clicking the button resets all bindings of the dictionary.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Attrs: IRdsAttributes;
Link: IRdsLink;
Param: IRdsParam;
ParamsControl: IRdsParamsControl;
Begin
MB := Params.Metabase;
MObj := MB.ItemByIdNamespace["DICT", MB.ItemById["NSI_LINK"].Key].Edit();
Dict := MObj As IRdsDictionary;
Attrs := Dict.Attributes;
Link := Dict.Links.FindByAttribute(Attrs.FindById("LINKATTR"));
Param := Link.Reference.Dictionary.Params.Item[0];
ParamsControl := Link.ParamsControl;
ParamsControl.Reset();
MObj.Save();
End Sub;
See also: