DataLoadStartDate: DateTime;
DataLoadStartDate: System.DateTime;
The DataLoadStartDate property determines the date of data loading start for all workbooks, that are in the context.
The ILanerContext.DataLoadEndDate property determines a date of data loading termination.
Executing the example requires a form containing:
A button with the Button1 identifier.
Two LanerBox components.
Two UiErAnalyzer components with the UiErAnalyzer1 and UiErAnalyzer2 identifiers that are data sources for LanerBox. Workbooks of the same time series database must be loaded to the UiErAnalyzer components.
Example is a handler of the OnClick event for the button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
pContext: ILanerContext;
Laner: ILaner;
Begin
pContext := New LanerContext.Create;
pContext.DataLoadStartDate := DateTime.Parse("01.01.1990");
pContext.DataLoadEndDate := DateTime.Parse("01.01.2020");
pContext.BeginLoad;
Laner := UiErAnalyzer1.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner);
End If;
Laner := UiErAnalyzer2.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner);
End If;
pContext.EndLoad;
End Sub Button1OnClick;
After executing the example, the workbooks, loaded to the UiErAnalyzer components,are registered in the created context. If the workbook already exists in any context, it is not registered.
Executing the example requires a .NET form containing:
A button with the button1 identifier.
Two LanerBoxNet components.
Two UiErAnalyzerNet components with the uiErAnalyzerNet1 and uiErAnalyzerNet2 identifiers that are data sources for LanerBoxNet components. Workbooks of one time series database must be loaded to the UiErAnalyzerNet components.
Example is a handler of the Click event for the button.
Imports Prognoz.Platform.Interop.Laner;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
pContext: ILanerContext;
Laner: ILaner;
Begin
pContext := New LanerContext.Create();
pContext.DataLoadStartDate := DateTime.Parse("01.01.1990");
pContext.DataLoadEndDate := DateTime.Parse("01.01.2020");
pContext.BeginLoad();
Laner := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner As LanerFactory);
End If;
Laner := UiErAnalyzerNet2.ErAnalyzer.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner As LanerFactory);
End If;
pContext.EndLoad();
End Sub;
After executing the example, the workbooks, loaded to the UiErAnalyzer components, are registered in the created context. If the workbook already exists in any context, it is not registered.
See also: