Show / Hide Table of Contents

Class AssociateMDOProviderBase

Base class for the MDO providers that use the associate table as the source for their data.

Inheritance
object
MDOProviderBase
AssociateMDOProviderBase
AssociateMDOProvider
AssociateRestrictionsMDOProviderBase
DiaryOwnerMDOProvider
ProjectAssociateMDOProvider
QuoteApprovalAssociateMDOProvider
ResourceMDOProvider
ServiceAssociateMDOProvider
VisibleForAssociateMDOProvider
Implements
ISoListProvider
ISoList
IEnumerable<ISoListItem>
IEnumerable
Inherited Members
MDOProviderBase._historyIds
MDOProviderBase._searchValue
MDOProviderBase._forceFlatList
MDOProviderBase._rootCollection
MDOProviderBase._historyCollection
MDOProviderBase._headingCollection
MDOProviderBase._declaredListName
MDOProviderBase._tableRows
MDOProviderBase._nodeType
MDOProviderBase._listName
MDOProviderBase._tableName
MDOProviderBase._tableListInfo
MDOProviderBase._listInfo
MDOProviderBase.FillListAsync(CancellationToken)
MDOProviderBase.AddSimpleListOrderByAsync(ListTableRows.CustomSearch, CancellationToken)
MDOProviderBase.GetItemsAndHeadingsQueryAsync(bool, CancellationToken, params int[])
MDOProviderBase.AddGroupLinkJoin(int[], ListTableRows.CustomSearch)
MDOProviderBase.GetItemId(ListTableRow)
MDOProviderBase.GetItemRank(ListTableRow)
MDOProviderBase.GetItemDeleted(ListTableRow)
MDOProviderBase.GetItemColor(ListTableRow)
MDOProviderBase.GetItemStyleHint(ListTableRow)
MDOProviderBase.GetGroupingAllowedForListAsync(CancellationToken)
MDOProviderBase.OnAddRootElementToCollection(SoListItem)
MDOProviderBase.GetListLowerLimitAsync(CancellationToken)
MDOProviderBase.GetPreferredSortOrderAsync(CancellationToken)
MDOProviderBase.BuildMdoCollectionsAsync(CancellationToken)
MDOProviderBase.GetHistoryItemsAsync(CancellationToken)
MDOProviderBase.ClearHistoryItems()
MDOProviderBase.GetRootItemsAsync(CancellationToken)
MDOProviderBase.GetHeadingItemsAsync(CancellationToken)
MDOProviderBase.IncludeDeletedItems
MDOProviderBase.InhibitResortOnFlattening
MDOProviderBase.IsFinalListFlat
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.BusinessLogic.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("additional_associate_id", "Associate that should be returned even if it's a former employee", 231)]
[MDOAdditionalInfo("get_deleted", "Associates that are retired", false)]
[MDOAdditionalInfo("add_binary_icon_hints", "Owner and history gets 24x24 person images", false)]
public abstract class AssociateMDOProviderBase : MDOProviderBase, ISoListProvider, ISoList, IEnumerable<ISoListItem>, IEnumerable
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

Constructors

AssociateMDOProviderBase(AssociateMDOProviderType)

Initialize the class

Declaration
public AssociateMDOProviderBase(AssociateMDOProviderType type)
Parameters
Type Name Description
AssociateMDOProviderType type
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

Fields

_AdditionalInfo

Any additional parameters to be used in the associate search

Declaration
protected Dictionary<string, string> _AdditionalInfo
Field Value
Type Description
Dictionary<string, string>
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

_additionalInfo_AddBinaryIconHints

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
public const string _additionalInfo_AddBinaryIconHints = "add_binary_icon_hints"
Field Value
Type Description
string
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

_additionalInfo_GetDeleted

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
public const string _additionalInfo_GetDeleted = "get_deleted"
Field Value
Type Description
string
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

Properties

HistoryInfo

History information for the supported list

Declaration
public override HistoryInfo HistoryInfo { get; }
Property Value
Type Description
HistoryInfo
Overrides
MDOProviderBase.HistoryInfo
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

PersonTableInfo

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
protected PersonTableInfo PersonTableInfo { get; }
Property Value
Type Description
PersonTableInfo
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

Methods

AcceptHistoryRow(ListTableRow)

Test if a history row is to be accepted into the collection

Declaration
protected override bool AcceptHistoryRow(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
bool
Overrides
MDOProviderBase.AcceptHistoryRow(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)

Phase two of the two-phase construction

Declaration
public override Task ConstructAsync(string tableName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string tableName
string additionalInfo
int[] historyIDs
bool onlyReadHistory
string searchValue
bool forceFlatList
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
MDOProviderBase.ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ExecuteQuery(Select, List<int>)

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.

List<int> resultIds

Collection holding the results of the query.

Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ExecuteReader(SoCommand)

Perform the execute reader on the command fetching all 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.

Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GenerateCommonQueryAsync(CustomSearch, ListInfo, CancellationToken)

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
protected virtual Task GenerateCommonQueryAsync(ListTableRows.CustomSearch query, ListInfo li, CancellationToken cancellationToken)
Parameters
Type Name Description
ListTableRows.CustomSearch query
ListInfo li
CancellationToken cancellationToken
Returns
Type Description
Task
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetAssociateFlatListAsync(CancellationToken)

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
protected Task<ListTableRows.CustomSearch> GetAssociateFlatListAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ListTableRows.CustomSearch>
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetAssociateHeadingAndItemsAsync(CancellationToken)

Associate headings are located in group

Declaration
protected Task<ListTableRows.CustomSearch> GetAssociateHeadingAndItemsAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ListTableRows.CustomSearch>
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetHeadingIconHint(ListTableRow)

Get the icon hint text for a heading item

Declaration
protected override string GetHeadingIconHint(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetHeadingIconHint(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetHeadingType(ListTableRow)

Get the type of the heading

Declaration
protected override string GetHeadingType(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetHeadingType(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetHistoryCollectionAsync(CancellationToken)

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 Task<ListTableRows.CustomSearch> GetHistoryCollectionAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ListTableRows.CustomSearch>

ListTableRows.CustomSearch

Overrides
MDOProviderBase.GetHistoryCollectionAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetHistoryIconHint(ListTableRow)

Get the icon hint for a history item

Declaration
protected override string GetHistoryIconHint(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetHistoryIconHint(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemExtraInfo(ListTableRow)

Base class for the MDO providers that use the associate table as the source for their data.

Declaration
protected override string GetItemExtraInfo(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetItemExtraInfo(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemIconHint(ListTableRow)

Get the icon hint for an item

Declaration
protected override string GetItemIconHint(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetItemIconHint(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemName(ListTableRow)

Get the name of an item

Declaration
protected override string GetItemName(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetItemName(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemTooltip(ListTableRow)

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
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetItemTooltip(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemType(ListTableRow)

Get the type of an item

Declaration
protected override string GetItemType(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
string
Overrides
MDOProviderBase.GetItemType(ListTableRow)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetItemsAndHeadingsQueryAsync(CancellationToken)

Get the query for the resources (associates are fetched separately)

Declaration
protected override Task<ListTableRows.CustomSearch> GetItemsAndHeadingsQueryAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ListTableRows.CustomSearch>
Overrides
MDOProviderBase.GetItemsAndHeadingsQueryAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

GetSimpleListQueryAsync(CancellationToken)

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 Task<ListTableRows.CustomSearch> GetSimpleListQueryAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ListTableRows.CustomSearch>

CustomSearch query for the simple list

Overrides
MDOProviderBase.GetSimpleListQueryAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

OnAddHeadingElementToCollection(SoListHeading)

Called when a heading item is added to the final collection

Declaration
protected override void OnAddHeadingElementToCollection(SoListHeading heading)
Parameters
Type Name Description
SoListHeading heading
Overrides
MDOProviderBase.OnAddHeadingElementToCollection(SoListHeading)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

OnAddHistoryElementToCollection(SoListItem)

Called when a history element is added to the final collection

Declaration
protected override void OnAddHistoryElementToCollection(SoListItem item)
Parameters
Type Name Description
SoListItem item
Overrides
MDOProviderBase.OnAddHistoryElementToCollection(SoListItem)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

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
List<ISoListItem> headingItemsCollection
Overrides
MDOProviderBase.OnAddSubItemToCollection(SoListItem, List<ISoListItem>)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ReadItemsAndHeadingsAsync(CancellationToken)

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 Task ReadItemsAndHeadingsAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
MDOProviderBase.ReadItemsAndHeadingsAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ReadSimpleListAsync(CancellationToken)

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 Task ReadSimpleListAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
MDOProviderBase.ReadSimpleListAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

ResortFlattenedListAsync(CancellationToken)

Override sorting of the associate list if it has been flattened

Declaration
protected override Task ResortFlattenedListAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
MDOProviderBase.ResortFlattenedListAsync(CancellationToken)
Remarks

The one thing to understand here is that, basically, associates are fetched by this class, while resources are fetched by the base class, and we try to combine those queries as well as possible. In fact, usually both queries are executed, but if we don't want resources then the resource query is 'sabotaged' by including a restriction that is always false, thereby making it collapse... and vice versa for associates. This design was reasonable enough when the provider was simple, but has now outlived its usefulness... however there is no time to fix it now, so we'll live with it for a while.

We should probably split into type-specific subproviders, not use the MDOProviderBase at all, and instead do some creative merging similar to what the archives do. Suggestions welcome to marek.

AdditionalInfo group_idx=-1 will retrive the MDO list for the logged on users main group.

Implements

ISoListProvider
ISoList
IEnumerable<T>
IEnumerable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top