Class PeriodsProvider
Period values: Day, Week, Month, Quarter, Year
Inherited Members
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
[MDOProviderPlugin("Periods")]
public class PeriodsProvider : LiteralsOnlyBase, ISoListProvider, ISoList
Constructors
PeriodsProvider()
Period values: Day, Week, Month, Quarter, Year
Declaration
public PeriodsProvider()
Fields
Day
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int Day = 1
Field Value
Type | Description |
---|---|
int |
HalfYear
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int HalfYear = 5
Field Value
Type | Description |
---|---|
int |
Month
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int Month = 3
Field Value
Type | Description |
---|---|
int |
ProviderNamePeriods
Period values: Day, Week, Month, Quarter, Year
Declaration
public const string ProviderNamePeriods = "Periods"
Field Value
Type | Description |
---|---|
string |
Quarter
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int Quarter = 4
Field Value
Type | Description |
---|---|
int |
Week
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int Week = 2
Field Value
Type | Description |
---|---|
int |
Year
Period values: Day, Week, Month, Quarter, Year
Declaration
public const int Year = 6
Field Value
Type | Description |
---|---|
int |
Methods
AddItems()
Subclass contract: use the RawRootItems and RawHeadingItems properties to add items to your literals-only list. The base class will then perform any search or flattening required.
Declaration
protected override void AddItems()
Overrides
Remarks
Lists that only contain literals can be either flat or grouped. If you create a grouped list and the caller specifies a forceFlatList attribute, the base class will do the flattening for you.
Examples
This example shows a typical implementation of a literal list, in this case the date interval list from the Filter dialog:
[MDOProviderPlugin( "FilterFutureDate" )]
public class FilterFutureDateList : LiteralsOnlyBase
{
protected override void AddItems()
{
RawRootItems.Add( new SoListItem( 1, "[SR_DATE_RANGE_3MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 2, "[SR_DATE_RANGE_4MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 3, "[SR_DATE_RANGE_6MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 4, "[SR_DATE_RANGE_1YEAR]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 5, "[SR_DATE_RANGE_2YEAR]", string.Empty, string.Empty ) );
}
}
Note that using a search in this case yields unexpected results. The search is performed on the raw items, which contains resource tags - and that is not what you actually want to search against. So resources + search do not go together.