Save([SaveOptions: LnSaveOptions = 255]): IRubricatorRevision;
SaveOptions. Parameter determining the changes, that need to be saved.
The Save method saves the series and returns the revision containing the changes made.
By default all the changes made in the data table are saved.
Executing the example requires a form with the following components: the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for LanerBox1. A working area of the time series database should be loaded to UiErAnalyzer1.
Before executing the example the added series, that needs to be saved, must be selected in the working area. The example is a handler of the OnClick event for the Button1 component.
Add links to the Express, ExtCtrls, Forms, Laner, Tab, and Ui system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Serie: ILanerSerie;
SerieCalc: ILanerCalculateSerie;
Begin
Serie := LanerBox1.SelectedSeries(0);
If Not Serie.StrictlyDefined
Then
WinApplication.InformationBox("Not all mandatory series attributes are determined '" + Serie.Name + "'");
Else
If Serie.SearchFactor = LnSerieFactorSearchResult.Found Then
WinApplication.InformationBox("Series with specified attributes already exists");
Else
SerieCalc := Serie As ILanerCalculateSerie;
SerieCalc.Save;
End If;
End If;
End Sub Button1OnClick;
After executing the example the added series is saved if all the mandatory attributes of the series are determined and do not duplicate existing series.
See also: