Class AssociateMDOProviderBase
Base class for the MDO providers that use the associate table as the source for their data.
Inheritance
System.Object
AssociateMDOProviderBase
Implements
System.Collections.IEnumerable
Assembly: SoDataBase.dll
Syntax
[MDOAdditionalInfoSeparator(";")]
[MDOAdditionalInfo("heading_id", "Associates linked to this heading", 2)]
[MDOAdditionalInfo("group_idx", "Associates belonging to this user group (primary or secondary groups)", 2)]
[MDOAdditionalInfo("project_id", "Associates that are members of this project", 231)]
[MDOAdditionalInfo("get_deleted", "Associates that are retired", false)]
public abstract class AssociateMDOProviderBase : MDOProviderBase, ISoListProvider, ISoList, IPlugin, IEnumerable<ISoListItem>, IEnumerable
Constructors
AssociateMDOProviderBase(AssociateMDOProviderType)
Declaration
public AssociateMDOProviderBase(AssociateMDOProviderType type)
Parameters
Fields
_AdditionalInfo
Any additional parameters to be used in the associate search
Declaration
protected Dictionary<string, string> _AdditionalInfo
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
_additionalInfo_GetDeleted
Declaration
public const string _additionalInfo_GetDeleted = "get_deleted"
Field Value
Type |
Description |
System.String |
|
Properties
HistoryInfo
Declaration
public override HistoryInfo HistoryInfo { get; }
Property Value
Overrides
PersonTableInfo
Declaration
protected PersonTableInfo PersonTableInfo { get; }
Property Value
Methods
AcceptHistoryRow(ListTableRow)
Test if a history row is to be accepted into the collection
Declaration
protected override bool AcceptHistoryRow(ListTableRow row)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Construct(String, String, Int32[], Boolean, String, Boolean)
Phase two of the two-phase construction
Declaration
public override void Construct(string tableName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
System.String |
additionalInfo |
|
System.Int32[] |
historyIDs |
|
System.Boolean |
onlyReadHistory |
|
System.String |
searchValue |
|
System.Boolean |
forceFlatList |
|
Overrides
ExecuteQuery(Select, List<Int32>)
Execute the query in the database.
Declaration
protected void ExecuteQuery(Select sql, List<int> resultIds)
Parameters
Type |
Name |
Description |
Select |
sql |
The query to execute in the database.
|
System.Collections.Generic.List<System.Int32> |
resultIds |
Collection holding the results of the query.
|
ExecuteReader(SoCommand)
Perform the execute reader on the command fetching the first 500 items.
Declaration
protected SoDataReader ExecuteReader(SoCommand cmd)
Parameters
Type |
Name |
Description |
SoCommand |
cmd |
The command toe perform the execute reader on.
|
Returns
Type |
Description |
SoDataReader |
The reader resulted from the execute reader method.
|
GenerateCommonQuery(ListTableRows.CustomSearch, ListInfo)
Declaration
protected virtual void GenerateCommonQuery(ListTableRows.CustomSearch query, ListInfo li)
Parameters
GetAssociateFlatList()
Declaration
protected ListTableRows.CustomSearch GetAssociateFlatList()
Returns
GetAssociateHeadingAndItems()
Associate headings are located in group
Declaration
protected ListTableRows.CustomSearch GetAssociateHeadingAndItems()
Returns
GetHeadingIconHint(ListTableRow)
Get the icon hint text for a heading item
Declaration
protected override string GetHeadingIconHint(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetHeadingType(ListTableRow)
Get the type of the heading
Declaration
protected override string GetHeadingType(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetHistoryCollection()
Get History collection for associate list.
History is both resource and associates, and field extra_id in history table
indicate that the history is for the associatechooser.
Declaration
protected override ListTableRows.CustomSearch GetHistoryCollection()
Returns
Overrides
GetHistoryIconHint(ListTableRow)
Get the icon hint for a history item
Declaration
protected override string GetHistoryIconHint(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetItemIconHint(ListTableRow)
Get the icon hint for an item
Declaration
protected override string GetItemIconHint(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetItemName(ListTableRow)
Declaration
protected override string GetItemName(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetItemsAndHeadingsQuery()
Get the query for the resources (associates are fetched separately)
Declaration
protected override ListTableRows.CustomSearch GetItemsAndHeadingsQuery()
Returns
Overrides
Use dynamic tooltips for associates, since that gives more information; use static tooltip text for other types
Declaration
protected override string GetItemTooltip(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetItemType(ListTableRow)
Declaration
protected override string GetItemType(ListTableRow row)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetSimpleListQuery()
Get a query to return a flat list if preference grouping allowed == false.
This might happen for the associate chooser list if Admin Grouped list/Associate/Resources" is set to No.
Declaration
protected override ListTableRows.CustomSearch GetSimpleListQuery()
Returns
Overrides
OnAddHeadingElementToCollection(SoListHeading)
Called when a heading item is added to the final collection
Declaration
protected override void OnAddHeadingElementToCollection(SoListHeading heading)
Parameters
Overrides
OnAddHistoryElementToCollection(SoListItem)
Called when a history element is added to the final collection
Declaration
protected override void OnAddHistoryElementToCollection(SoListItem item)
Parameters
Overrides
OnAddSubItemToCollection(SoListItem, List<ISoListItem>)
Called when an item is added to the item list of a heading
Declaration
protected override void OnAddSubItemToCollection(SoListItem item, List<ISoListItem> headingItemsCollection)
Parameters
Type |
Name |
Description |
SoListItem |
item |
|
System.Collections.Generic.List<ISoListItem> |
headingItemsCollection |
|
Overrides
ReadItemsAndHeadings()
Read heading and items.
Special for associate is the combination of associates and resources in the same list.
This means there will have to be two queries to get the items for the list.
Declaration
protected override void ReadItemsAndHeadings()
Overrides
ReadSimpleList()
For diaryowner list, get the associate list and return it as a flat list if
Admin Grouped list/Associate/Resources" is set to No.
Declaration
protected override void ReadSimpleList()
Overrides
ResortFlattenedList()
Override sorting of the associate list if it has been flattened
Declaration
protected override void ResortFlattenedList()
Overrides
Implements
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
Extension Methods
EnumUtil.MapEnums<From, To>(From)