Class TargetTypeProvider
Inheritance
TargetTypeProvider
Assembly: SoDataBase.dll
Syntax
[MDOProviderPlugin("TargetTypes")]
[MDOAdditionalInfoSeparator("&")]
[MDOAdditionalInfo("TargetEntityType", "The entity type for which to return target types. (Sale, Project, Selection, etc.)", "")]
[MDOAdditionalInfo("IncludeAll", "Include All item.", false)]
[MDOAdditionalInfo("IncludeAll", "Include invalid choices (already used for all measure types).", false)]
public class TargetTypeProvider : LiteralsOnlyBase, ISoListProvider, ISoList
Constructors
TargetTypeProvider()
Declaration
public TargetTypeProvider()
Fields
ProviderName
Declaration
public const string ProviderName = "TargetTypes"
Field Value
Declaration
protected SoListHeading _contactRoot
Field Value
_id
Declaration
Field Value
_saleRoot
Declaration
protected SoListHeading _saleRoot
Field Value
c_includeAllKey
Declaration
public const string c_includeAllKey = "IncludeAll"
Field Value
c_includeInvalid
Declaration
public const string c_includeInvalid = "IncludeInvalid"
Field Value
c_targetEntityTypeKey
Declaration
public const string c_targetEntityTypeKey = "TargetEntityType"
Field Value
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
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.
FieldToProviderColName(FieldInfo)
Declaration
public static string FieldToProviderColName(FieldInfo field)
Parameters
Returns
IsUnique(TargetEntityType, TargetMeasurementUnit, string, int)
Declaration
public static bool IsUnique(TargetEntityType entityType, TargetMeasurementUnit measurementUnit, string listField, int id)
Parameters
Returns
ProviderColNameToField(TargetEntityType, string)
Declaration
public static FieldInfo ProviderColNameToField(TargetEntityType targetEntityType, string providerColName)
Parameters
Returns
ProviderColumnToListInfo(TargetEntityType, string)
Declaration
public static (string listName, string listLabel, int listId, int listTableId) ProviderColumnToListInfo(TargetEntityType targetEntityType, string colName)
Parameters
Returns
Implements
Extension Methods