Class PeriodService
Inheritance
Implements
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class PeriodService : Object, IPeriodService
Constructors
PeriodService(IApiService)
Declaration
public PeriodService(IApiService apiService)
Parameters
Type | Name | Description |
---|---|---|
IApiService | apiService |
Methods
GetCommittedPeriod(Int32)
Gets the results of a commited commission period.
Declaration
public Task<Period> GetCommittedPeriod(int periodId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | periodId | The commission periodId to get details about. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Period> | The Period returned will have all fields filled out. |
GetCommittedPeriods(PeriodType, DateTime, DateTime)
Gets the results of a commited commission periods between beginDate
and endDate
of type periodType
.
Declaration
public Task<Period[]> GetCommittedPeriods(PeriodType periodType, DateTime beginDate, DateTime endDate)
Parameters
Type | Name | Description |
---|---|---|
PeriodType | periodType | Include periods of this type. |
System.DateTime | beginDate | Include periods after this date. |
System.DateTime | endDate | Include periods before this date. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Period[]> | The Periods returned will have all fields filled out. |
GetPeriods(String, DateTime, DateTime)
Contains both the committed and uncommited periods for templateName
between beginDate
and endDate
.
Declaration
public Task<Period[]> GetPeriods(string templateName, DateTime beginDate, DateTime endDate)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | The name of the template. (Ex: Weekly, Monthly) |
System.DateTime | beginDate | Include periods after this date. |
System.DateTime | endDate | Include periods before this date. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Period[]> | Result array may contain some committed periods and some uncommited periods. Information about the dates and template used will be populated, but results will not be populated for uncommited. |
GetUnCommittedPeriod(String, DateTime)
Gets the basic period info for the open commission period that contains date
for templateName
.
Declaration
public Task<Period> GetUnCommittedPeriod(string templateName, DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | The name of the template. (Ex: Weekly, Monthly) |
System.DateTime | date | A date within the desired period. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Period> | The period returned will contain information about the time period and the template being used, but the profile has not been committed, so no results information will be populated. |
Remarks
This method may be called to get some information about committed periods as well, such as the begin and end dates, but the result information will not be included.