Remove(Value: LocaleCodeID): Boolean;
Remove(Value: Prognoz.Platform.Interop.ForeSystem.LocaleCodeID): Boolean;
Value. Language.
The Remove method removes the name by the specified language.
The method returns True if removal succeeded, otherwise – False.
This example requires that the repository contains an object with the Object identifier that has the name for the Spanish language (Argentina).
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
Obj:IMetabaseObjectDescriptor;
NamesL : IMetabaseObjectNames;
Begin
MB := MetabaseClass.Active;
Obj := MB.ItemById("OBJECT").EditDescriptor;
NamesL := Obj.Names;
NamesL.Remove(LocaleCodeID.Spanish_Argentina);
Obj.SaveDescriptor;
End Sub UserProc;
After executing this example the name for the Spanish language (Argentina) is deleted.
To execute the example, add a link to the ForeSystem system assembly.
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Obj:IMetabaseObjectDescriptor;
NamesL : IMetabaseObjectNames;
Begin
MB := Params.Metabase;
Obj := MB.ItemById["OBJECT"].EditDescriptor();
NamesL := Obj.Names;
NamesL.Remove(LocaleCodeID.lcidSpanish_Argentina);
Obj.SaveDescriptor();
End Sub;
The result of the Fore.NET Example execution matches that of the Fore Example.
See also: