Show / Hide Table of Contents

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
Object
MDOProviderBase
InterestHelper
AssociateMDOProviderBase
CountryProvider
GenericMDOProvider
GuideStepProvider
IgnoreGroupingAndHeadingsForAdminMdoProviderBase
LocationListProvider
PrivacyTemplateProvider
QuoteTemplateProvider
RelationListProvider
TaskProvider
UdListMDOProvider
WebPanelProvider
Implements
ISoListProvider
ISoList
IEnumerable<ISoListItem>
IEnumerable
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public abstract class MDOProviderBase : Object, ISoListProvider, ISoList, IPlugin, IEnumerable<ISoListItem>, IEnumerable

Constructors

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.

Declaration
protected MDOProviderBase()

Fields

_declaredListName

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected string _declaredListName
Field Value
Type Description
String

_forceFlatList

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected bool _forceFlatList
Field Value
Type Description
Boolean

_headingCollection

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected List<ISoListHeading> _headingCollection
Field Value
Type Description
List<ISoListHeading>

_historyCollection

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected List<ISoListItem> _historyCollection
Field Value
Type Description
List<ISoListItem>

_historyIds

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected int[] _historyIds
Field Value
Type Description
Int32[]

_listInfo

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected ListInfo _listInfo
Field Value
Type Description
ListInfo

_listName

The name of the list. Used to identify mdo-list entries in the UserPreference-table.

Declaration
protected string _listName
Field Value
Type Description
String

_nodeType

Explains what kind the current object is. MDOListElementType

Declaration
protected MDOListElementType _nodeType
Field Value
Type Description
MDOListElementType

_rootCollection

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected List<ISoListItem> _rootCollection
Field Value
Type Description
List<ISoListItem>

_searchValue

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected string _searchValue
Field Value
Type Description
String

_tableListInfo

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected TableInfo _tableListInfo
Field Value
Type Description
TableInfo

_tableName

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected string _tableName
Field Value
Type Description
String

_tableRows

ListTableRows list with items and headings

Declaration
protected ListTableRows _tableRows
Field Value
Type Description
ListTableRows

Properties

HeadingItems

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
public List<ISoListHeading> HeadingItems { get; }
Property Value
Type Description
List<ISoListHeading>

HistoryInfo

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
public abstract HistoryInfo HistoryInfo { get; }
Property Value
Type Description
HistoryInfo

HistoryItems

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
public List<ISoListItem> HistoryItems { get; }
Property Value
Type Description
List<ISoListItem>

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
Type Description
Boolean

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
Type Description
Boolean

IsFinalListFlat

After population, this property will tell us if the final list is actually flat or not

Declaration
protected bool IsFinalListFlat { get; }
Property Value
Type Description
Boolean

RootItems

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
public List<ISoListItem> RootItems { get; }
Property Value
Type Description
List<ISoListItem>

Methods

AcceptHistoryRow(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual bool AcceptHistoryRow(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
Boolean

AddGroupLinkJoin(Int32[], ListTableRows.CustomSearch)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void AddGroupLinkJoin(int[] selectedIds, ListTableRows.CustomSearch query)
Parameters
Type Name Description
Int32[] selectedIds
ListTableRows.CustomSearch query

AddSimpleListOrderBy(ListTableRows.CustomSearch)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void AddSimpleListOrderBy(ListTableRows.CustomSearch query)
Parameters
Type Name Description
ListTableRows.CustomSearch query

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()

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual bool GetGroupingAllowedForList()
Returns
Type Description
Boolean

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
Type Description
String

GetHistoryCollection()

Builds the history-node collection.

Declaration
protected virtual ListTableRows.CustomSearch GetHistoryCollection()
Returns
Type Description
ListTableRows.CustomSearch

GetHistoryIconHint(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual string GetHistoryIconHint(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
String

GetItemColor(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual int GetItemColor(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
Int32

GetItemDeleted(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual bool GetItemDeleted(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
Boolean

GetItemExtraInfo(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual string GetItemExtraInfo(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
String

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)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual int GetItemId(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
Int32

GetItemName(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual string GetItemName(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
String

GetItemRank(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual short GetItemRank(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
Int16

GetItemsAndHeadingsQuery()

Create a query for for reading the items and headings of a list.

Declaration
protected virtual ListTableRows.CustomSearch GetItemsAndHeadingsQuery()
Returns
Type Description
ListTableRows.CustomSearch

Query for reading the items and headdings of a list.

Remarks

A search string that is not empty will result in a flattened list.

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
Type Description
ListTableRows.CustomSearch

Query for reading the items and headdings of a list.

Remarks

The _listInfo is populated.

The resulting query will contain an OR clause in the grouplink join if selectedIds != null:
select distinct c.* from crm5.category c inner join crm5.categorygrouplink cg
on c.category_id = cg.category_id and
(cg.group_id = 1 or cg.category_id in (1,2,3))
This works as long as we do not fetch any of the fields from the grouplink table (that would break the distinct clause and cause unwanted row multiplication).

GetItemStyleHint(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual string GetItemStyleHint(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
String

GetItemTooltip(ListTableRow)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual string GetItemTooltip(ListTableRow row)
Parameters
Type Name Description
ListTableRow row
Returns
Type Description
String

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()

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual MDOSortOrder GetPreferredSortOrder()
Returns
Type Description
MDOSortOrder

GetSimpleListQuery()

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual ListTableRows.CustomSearch GetSimpleListQuery()
Returns
Type Description
ListTableRows.CustomSearch

OnAddHeadingElementToCollection(SoListHeading)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void OnAddHeadingElementToCollection(SoListHeading heading)
Parameters
Type Name Description
SoListHeading heading

OnAddHistoryElementToCollection(SoListItem)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void OnAddHistoryElementToCollection(SoListItem item)
Parameters
Type Name Description
SoListItem item

OnAddRootElementToCollection(SoListItem)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void OnAddRootElementToCollection(SoListItem item)
Parameters
Type Name Description
SoListItem item

OnAddSubItemToCollection(SoListItem, List<ISoListItem>)

Base class for MDO List providers. This class knows about MDO lists and History, in addition to the knowledge provided by the base class.

Declaration
protected virtual void OnAddSubItemToCollection(SoListItem item, List<ISoListItem> headingItemsCollection)
Parameters
Type Name Description
SoListItem item
List<ISoListItem> headingItemsCollection

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()

Implements

ISoListProvider
ISoList
System.Collections.Generic.IEnumerable<T>
System.Collections.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