Show / Hide Table of Contents

Class AnyTableListProviderBase

Base class for flat "MDO Lists" for any tables, that does not support filtering through group and heading link, etc...

Inheritance
Object
AnyTableListProviderBase
ChartSelectionProvider
SaintTicketCategoryProvider
AddressFormatListProvider
AppointmentListProvider
AttachmentListProvider
AvailableReportsProvider
ConsentPurposeProvider
ConsentSourceListProvider
CustLangListProvider
DashboardProvider
DocumentListProvider
EjCategoryProvider
EmailAddressProvider
EmailFolderProvider
FormFolderProvider
FunctionRightsListProvider
KbEntryListProvider
LegalBaseListProvider
OwnerContactProvider
PersonEmailAddressProvider
PersonPhoneProvider
PersonUrlProvider
PhoneSearchProvider
PrefDescLineProvider
PriceListProvider
QuoteDocuments
RolesListProvider
SaleGuideStage
SaleListProvider
SaleListProviderOrg
SaleTypeCategoryListProvider
SatellitesProvider
ShipmentTypeProvider
StatusDefProvider
SuggestedAppointmentProvider
SuggestedDocumentProvider
TicketListProvider
TicketPriorityListProvider
TicketTicketStatusProvider
UserGroupProvider
UserPlanProvider
WebPanelGroupProvider
Implements
ISoListProvider
ISoList
Inherited Members
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.dll
Syntax
public abstract class AnyTableListProviderBase : ISoListProvider, ISoList, IPlugin

Constructors

AnyTableListProviderBase()

Default Constructor

Declaration
protected AnyTableListProviderBase()

Properties

AdditionalInfo

Additional information to provider

Declaration
protected string AdditionalInfo { get; set; }
Property Value
Type Description
String

ForceFlatList

If true, the returned list will be flat, though it will still be filtered if grouping/filtering has been set up for the list.

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

HeadingItems

This list will never have headings.

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

HistoryIDs

Array of history ID's; if non-null, this will BE the history; a non-null but empty array will disable reading of history altogether; a null parameter will cause history to be read from the database.

Declaration
protected int[] HistoryIDs { get; set; }
Property Value
Type Description
Int32[]

HistoryInfo

History information for the supported list

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

HistoryItems

History items for the "MDO" list.

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

ListName

List name (though note that as implemented by MDOProviderBase, this actually has to be a real table name, so subclasses should override and convert from their list name to a real table name) (yes it's a bit messy)

Declaration
protected string ListName { get; set; }
Property Value
Type Description
String

OnlyReadHistory

if true, only history will be read.

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

RootItems

Root items (e.g. items) for the "MDO List".

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

SearchValue

If non-null, the returned list will be flat and only consist of search matches.

Declaration
protected string SearchValue { get; set; }
Property Value
Type Description
String

TableInfo

The amin table info of the query. This is used by subclasses (e.g. this class) when restricting history data.

Declaration
protected abstract TableInfo TableInfo { get; }
Property Value
Type Description
TableInfo

Methods

Construct(String, String, Int32[], Boolean, String, Boolean)

Phase two of two-stage list construction. To be called right after the constructor, at which point all constructors have run, and the class hierarchy is initialized.

Declaration
public void Construct(string listName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList)
Parameters
Type Name Description
String listName

List name (though note that as implemented by MDOProviderBase, this actually has to be a real table name, so subclasses should override and convert from their list name to a real table name) (yes it's a bit messy)

String additionalInfo

Additional information to provider

Int32[] historyIDs

Array of history ID's; if non-null, this will BE the history; a non-null but empty array will disable reading of history altogether; a null parameter will cause history to be read from the database.

Boolean onlyReadHistory

if true, only history will be read.

String searchValue

If non-null, the returned list will be flat and only consist of search matches

Boolean forceFlatList

If true, the returned list will be flat, though it will still be filtered if grouping/filtering has been set up for the list

ExecuteQuery(Select, List<ISoListItem>)

Execute the query in the database.

Declaration
protected virtual void ExecuteQuery(Select sql, List<ISoListItem> resultCollection)
Parameters
Type Name Description
Select sql

The query to execute in the database.

List<ISoListItem> resultCollection

Collection holding the results of the query.

ExecuteReader(SoCommand)

Perform the execute reader on the command fetching the first 500 items.
Override this methid if filters on the amount returned needs to be handled.

Declaration
protected virtual 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.

GetHistoryItems()

Get all the history items from the database

Declaration
protected virtual List<ISoListItem> GetHistoryItems()
Returns
Type Description
List<ISoListItem>

Root items.

GetMainQuery()

Get the main query for the list.

Declaration
protected abstract Select GetMainQuery()
Returns
Type Description
Select

GetRootItems()

Get all the root items from the database

Declaration
protected virtual List<ISoListItem> GetRootItems()
Returns
Type Description
List<ISoListItem>

History items.

Init()

Initiate the provider after the Construct(String, String, Int32[], Boolean, String, Boolean) method is called.

Declaration
protected abstract void Init()

OnPostGetRootItems(List<ISoListItem>)

Event raised by GetRootItems() after values are fetched from the database.

Declaration
protected virtual void OnPostGetRootItems(List<ISoListItem> items)
Parameters
Type Name Description
List<ISoListItem> items

List of items returned from GetRootItems().

OnPreGetRootItems(List<ISoListItem>)

Event raised by GetRootItems() before values are fetched from the database.

Declaration
protected virtual void OnPreGetRootItems(List<ISoListItem> items)
Parameters
Type Name Description
List<ISoListItem> items

List of items returned from GetRootItems().

OnRead(SoDataReader, Int16)

Raised every time a new row has been read from the database.
The implementation should read tthe results from the reader and populate an object implementing ISoListItem.

Declaration
protected abstract ISoListItem OnRead(SoDataReader reader, short lastRank)
Parameters
Type Name Description
SoDataReader reader

Reader to reaf from.

Int16 lastRank

Value of the last rank populated.

Returns
Type Description
ISoListItem

Data read from the reader.

SetHistoryRestriction(Select)

Set History restriction to the query. TableInfo is used when manipulating the query.

Declaration
protected virtual void SetHistoryRestriction(Select sql)
Parameters
Type Name Description
Select sql

The query to modify.

SetSearchRestriction(Select, String)

Set the search restriction on the list.

Declaration
protected abstract void SetSearchRestriction(Select sql, string searchValue)
Parameters
Type Name Description
Select sql

Query to set the search restriction on.

String searchValue

The value of the search restriction.

Implements

ISoListProvider
ISoList

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