loadUsageItemsInRange() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Related Methods

Function

  • Return an array of usage item structures which contain daily database measurement data

Syntax

  • AeUsageItemAry = AeXMLBridge.loadUsageItemsInRange(DateRangeEnum, MinDate, MaxDate);

Parameters

  • Enumeration - TDateRangeEnum
  • String - begin date (yyyy-MM-dd format)
  • String - end date (yyyy-MM-dd format)

Return Value

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

TDateRangeEnum dateRange = TDateRangeEnum.drCurrPeriod;
// using current period

string minDate = string.Empty;
string maxDate = string.Empty;

try
{
TAeUsageItem[] usageItems = ws.loadUsageItemsInRange(dateRange, minDate, maxDate);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13

Dim dateRange As TDateRangeEnum = TDateRangeEnum.drCurrPeriod
' using current period

Dim minDate As String = String.Empty
' set to empty string since not using TDateRangeEnum.drCustom
Dim maxDate As String = String.Empty

Try
Dim usageItems As TAeUsageItem() = ws.loadUsageItemsInRange(dateRange, minDate, maxDate)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • If using the [TDateRangeEnum] value drCustom, the date parameters must be set and in a yyyy-MM-dd format. Otherwise set to empty/null

Possible Errors

  • yyyy-mm-dd is required [Date supplied in invalid format]

loadBillingItemsExInRange
loadBillingItemsInRange

Back to Top