Show / Hide Table of Contents

Class TargetHelper

Inheritance
object
TargetHelper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public static class TargetHelper

Methods

BucketValues(double[], int)

Aggregates the values in input-collection.

Declaration
public static double[] BucketValues(double[] values, int bucketSize)
Parameters
Type Name Description
double[] values
int bucketSize

How many values are aggregated together in the input-collection.

Returns
Type Description
double[]

ConvertNumberToPeriodType(int)

Declaration
public static TargetPeriodType ConvertNumberToPeriodType(int number)
Parameters
Type Name Description
int number
Returns
Type Description
TargetPeriodType

ConvertPeriodTypeToNumber(TargetPeriodType)

Declaration
public static int ConvertPeriodTypeToNumber(TargetPeriodType periodType)
Parameters
Type Name Description
TargetPeriodType periodType
Returns
Type Description
int

GetDefaultPeriodTypeAsync(CancellationToken)

Declaration
public static Task<TargetPeriodType> GetDefaultPeriodTypeAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<TargetPeriodType>

GetDefaultValues(TargetPeriodType)

Declaration
public static double[] GetDefaultValues(TargetPeriodType tpt)
Parameters
Type Name Description
TargetPeriodType tpt
Returns
Type Description
double[]

GetDefaultValues(int)

Declaration
public static double[] GetDefaultValues(int count)
Parameters
Type Name Description
int count
Returns
Type Description
double[]

GetQueryForTargetGroup(int, TargetAssignementLevel, out TargetAssignmentInfoTableInfo, out TargetAssignmentValueTableInfo)

Get a select-query that retrieves all TargetAssignmentInfo-, TargetPeriod- and TargetAssignmentValue-rows related to the specified TargetGroup.

Declaration
public static TargetedSelect<TargetPeriodTableInfo> GetQueryForTargetGroup(int targetGroupId, TargetAssignementLevel assignmentLevel, out TargetAssignmentInfoTableInfo infoTable, out TargetAssignmentValueTableInfo valueTable)
Parameters
Type Name Description
int targetGroupId
TargetAssignementLevel assignmentLevel
TargetAssignmentInfoTableInfo infoTable
TargetAssignmentValueTableInfo valueTable
Returns
Type Description
TargetedSelect<TargetPeriodTableInfo>

GetTargetGroupIdForYear(int, TargetEntityType, CancellationToken)

Declaration
public static Task<int> GetTargetGroupIdForYear(int year, TargetEntityType entity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int year
TargetEntityType entity
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetTargetGroupIdForYearAndDimensionAsync(int, int, CancellationToken)

Declaration
public static Task<int> GetTargetGroupIdForYearAndDimensionAsync(int targetYear, int dimensionId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int targetYear
int dimensionId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetTargetGroupYearAsync(int, CancellationToken)

Declaration
public static Task<int> GetTargetGroupYearAsync(int targetGroupId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int targetGroupId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

SpreadValues(double[], int)

Divides each value into several new values. Rounds up to nearest whole if value is positive, rounds down if value is negative.

Declaration
public static double[] SpreadValues(double[] values, int spreadSize)
Parameters
Type Name Description
double[] values
int spreadSize

The amount of new values each value in input-collection is divided into.

Returns
Type Description
double[]

TargetPeriod(DateTime, TargetPeriodType)

Declaration
public static int TargetPeriod(this DateTime date, TargetPeriodType periodType)
Parameters
Type Name Description
DateTime date
TargetPeriodType periodType
Returns
Type Description
int
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top