Class MDOProviderBase
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the base class.
Inheritance
MDOProviderBase
Assembly: SoDataBase.dll
Syntax
public abstract class MDOProviderBase : ISoListProvider, ISoList, IPlugin, IEnumerable<ISoListItem>, IEnumerable
Constructors
MDOProviderBase()
Declaration
protected MDOProviderBase()
Fields
_declaredListName
Declaration
protected string _declaredListName
Field Value
_forceFlatList
Declaration
protected bool _forceFlatList
Field Value
_headingCollection
Declaration
protected List<ISoListHeading> _headingCollection
Field Value
_historyCollection
Declaration
protected List<ISoListItem> _historyCollection
Field Value
_historyIds
Declaration
protected int[] _historyIds
Field Value
_listInfo
Declaration
protected ListInfo _listInfo
Field Value
_listName
The name of the list. Used to identify mdo-list entries in the UserPreference-table.
Declaration
protected string _listName
Field Value
_nodeType
Declaration
protected MDOListElementType _nodeType
Field Value
_rootCollection
Declaration
protected List<ISoListItem> _rootCollection
Field Value
_searchValue
Declaration
protected string _searchValue
Field Value
_tableListInfo
Declaration
protected TableInfo _tableListInfo
Field Value
_tableName
Declaration
protected string _tableName
Field Value
_tableRows
Declaration
protected ListTableRows _tableRows
Field Value
Properties
HeadingItems
Declaration
public List<ISoListHeading> HeadingItems { get; }
Property Value
HistoryInfo
Declaration
public abstract HistoryInfo HistoryInfo { get; }
Property Value
HistoryItems
Declaration
public List<ISoListItem> HistoryItems { get; }
Property Value
IncludeDeletedItems
Should items with the Deleted flag be included in the search. Default is false. Must be set before running the queries!
Declaration
public bool IncludeDeletedItems { get; set; }
Property Value
InhibitResortOnFlattening
If a heading-grouped list becomes flattened, it is usually resorted according to the current list preference.
Some providers may not want that, if they already have made some evaluations of what is going on. Setting this properties
will cause the resorting to be skipped.
Declaration
public bool InhibitResortOnFlattening { get; set; }
Property Value
IsFinalListFlat
After population, this property will tell us if the final list is actually flat or not
Declaration
protected bool IsFinalListFlat { get; }
Property Value
RootItems
Declaration
public List<ISoListItem> RootItems { get; }
Property Value
Methods
AcceptHistoryRow(ListTableRow)
Declaration
protected virtual bool AcceptHistoryRow(ListTableRow row)
Parameters
Returns
AddGroupLinkJoin(Int32[], ListTableRows.CustomSearch)
Declaration
protected virtual void AddGroupLinkJoin(int[] selectedIds, ListTableRows.CustomSearch query)
Parameters
AddSimpleListOrderBy(ListTableRows.CustomSearch)
Declaration
protected virtual void AddSimpleListOrderBy(ListTableRows.CustomSearch query)
Parameters
BuildMdoCollections()
Convert rows object to ISoList collections
Declaration
protected virtual void BuildMdoCollections()
Construct(String, String, Int32[], Boolean, String, Boolean)
Initializes all class members.
Declaration
public virtual void Construct(string tableName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList)
Parameters
Type |
Name |
Description |
String |
tableName |
Name of the table holding the MDO list values, like Category, Business, etc. Note that this really has to be a valid table name.
|
String |
additionalInfo |
|
Int32[] |
historyIDs |
List of history id's (primary keys of the table holding the MDO list values).
|
Boolean |
onlyReadHistory |
Only read history nodes.
|
String |
searchValue |
Search value (case insensetive string used like '%[searchValue]%'. The result when using this is allways a flat list without hisotry elements.
|
Boolean |
forceFlatList |
State that a forced flat list should be returned.
|
FillList()
Fills the MDO-list with data.
Declaration
protected virtual void FillList()
GetGroupingAllowedForList()
Declaration
protected virtual bool GetGroupingAllowedForList()
Returns
GetHeadingIconHint(ListTableRow)
Get a value for the field IconHint in ISoList for a heading element
Declaration
protected virtual string GetHeadingIconHint(ListTableRow row)
Parameters
Type |
Name |
Description |
ListTableRow |
row |
The actual row for which the item is created
|
Returns
Type |
Description |
String |
An icon hint text
|
GetHeadingType(ListTableRow)
Get a value for the field Type in ISoList for a heading element
Declaration
protected virtual string GetHeadingType(ListTableRow row)
Parameters
Type |
Name |
Description |
ListTableRow |
row |
The actual row for which the item is created
|
Returns
GetHistoryCollection()
Builds the history-node collection.
Declaration
protected virtual ListTableRows.CustomSearch GetHistoryCollection()
Returns
GetHistoryIconHint(ListTableRow)
Declaration
protected virtual string GetHistoryIconHint(ListTableRow row)
Parameters
Returns
GetItemColor(ListTableRow)
Declaration
protected virtual int GetItemColor(ListTableRow row)
Parameters
Returns
GetItemDeleted(ListTableRow)
Declaration
protected virtual bool GetItemDeleted(ListTableRow row)
Parameters
Returns
Declaration
protected virtual string GetItemExtraInfo(ListTableRow row)
Parameters
Returns
GetItemIconHint(ListTableRow)
Get a value for the field IconHint in ISoList for an item element
Declaration
protected virtual string GetItemIconHint(ListTableRow row)
Parameters
Type |
Name |
Description |
ListTableRow |
row |
The actual row for which the item is created
|
Returns
Type |
Description |
String |
An icon hint text
|
GetItemId(ListTableRow)
Declaration
protected virtual int GetItemId(ListTableRow row)
Parameters
Returns
GetItemName(ListTableRow)
Declaration
protected virtual string GetItemName(ListTableRow row)
Parameters
Returns
GetItemRank(ListTableRow)
Declaration
protected virtual short GetItemRank(ListTableRow row)
Parameters
Returns
GetItemsAndHeadingsQuery()
Create a query for for reading the items and headings of a list.
Declaration
protected virtual ListTableRows.CustomSearch GetItemsAndHeadingsQuery()
Returns
Remarks
GetItemsAndHeadingsQuery(Boolean, Int32[])
Create a query for for reading the items and headings of a list.
Declaration
protected virtual ListTableRows.CustomSearch GetItemsAndHeadingsQuery(bool bFlattened, params int[] selectedIds)
Parameters
Type |
Name |
Description |
Boolean |
bFlattened |
Force the list to be flattened.
|
Int32[] |
selectedIds |
Id's in the list that will be forced to be included, regardless of other filtering.
|
Returns
Remarks
GetItemStyleHint(ListTableRow)
Declaration
protected virtual string GetItemStyleHint(ListTableRow row)
Parameters
Returns
Declaration
protected virtual string GetItemTooltip(ListTableRow row)
Parameters
Returns
GetItemType(ListTableRow)
Get a value for the field Type in ISoList for an item element
Declaration
protected virtual string GetItemType(ListTableRow row)
Parameters
Type |
Name |
Description |
ListTableRow |
row |
The actual row for which the item is created
|
Returns
Type |
Description |
String |
The type of the list item
|
GetListLowerLimit()
How many items must there be in the list before we go into MDO-list mode?
Declaration
protected virtual int GetListLowerLimit()
Returns
Type |
Description |
Int32 |
the lower limit for this list
|
GetPreferredSortOrder()
Declaration
protected virtual MDOSortOrder GetPreferredSortOrder()
Returns
GetSimpleListQuery()
Declaration
protected virtual ListTableRows.CustomSearch GetSimpleListQuery()
Returns
OnAddHeadingElementToCollection(SoListHeading)
Declaration
protected virtual void OnAddHeadingElementToCollection(SoListHeading heading)
Parameters
OnAddHistoryElementToCollection(SoListItem)
Declaration
protected virtual void OnAddHistoryElementToCollection(SoListItem item)
Parameters
OnAddRootElementToCollection(SoListItem)
Declaration
protected virtual void OnAddRootElementToCollection(SoListItem item)
Parameters
OnAddSubItemToCollection(SoListItem, List<ISoListItem>)
Declaration
protected virtual void OnAddSubItemToCollection(SoListItem item, List<ISoListItem> headingItemsCollection)
Parameters
ReadItemsAndHeadings()
Read all mdo items with heading information
Declaration
protected virtual void ReadItemsAndHeadings()
ReadSimpleList()
ReadSimpleList reads the root-nodes and adds them to the list.
A simple list has no grouping or heading.
Declaration
protected virtual void ReadSimpleList()
ResortFlattenedList()
Resort a list that has been flattened.
Declaration
protected virtual void ResortFlattenedList()
Explicit Interface Implementations
IEnumerable<ISoListItem>.GetEnumerator()
Declaration
IEnumerator<ISoListItem> IEnumerable<ISoListItem>.GetEnumerator()
Returns
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)
IEnumerableExtensions.ForEach<T>(System.Collections.Generic.IEnumerable<T>, System.Action<T>)
IEnumerableExtensions.ContainsAny<T>(System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IEnumerable<T>)
IEnumerableExtensions.Batch<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, T, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, System.Func<T, System.Boolean>, System.Int32)
IEnumerableExtensions.Permute<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>, System.Collections.Generic.IEqualityComparer<K>)
IEnumerableExtensions.GetDifferentCombinations<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)