Show / Hide Table of Contents

Class SelectableListHelper

Utility class to help with the conversion of standard MDO lists to Selectable lists, and extracting selected ids from selectable lists. Contains only static methods.

Inheritance
Object
SelectableListHelper
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public static class SelectableListHelper : Object

Methods

ConvertToSelectable(ISoListProvider, Int32[], out List<ISoListItem>, out List<ISoListHeading>, out List<ISoListItem>)

Convert an ISoListProvider into an equivalent set of root, heading and history items, where each item conforms to the ISelectableListItem interface. If an array of id's to be selected is also provided, all elements corresponding to those id's will have the Selected attribute set to true.

Declaration
public static void ConvertToSelectable(ISoListProvider source, int[] selectedIds, out List<ISoListItem> rootItems, out List<ISoListHeading> headingItems, out List<ISoListItem> historyItems)
Parameters
Type Name Description
ISoListProvider source

Source list provider

Int32[] selectedIds

Array of ID's to select, can be null

List<ISoListItem> rootItems

Out: root items corresponding to the original root items

List<ISoListHeading> headingItems

Out: heading items corresponding to the original heading items

List<ISoListItem> historyItems

Out: history items corresponding to the original history items

GetAllIds(ISoListProvider)

Utility class to help with the conversion of standard MDO lists to Selectable lists, and extracting selected ids from selectable lists. Contains only static methods.

Declaration
public static int[] GetAllIds(ISoListProvider provider)
Parameters
Type Name Description
ISoListProvider provider
Returns
Type Description
Int32[]

GetSelectedIds(ISoListProvider)

Extract the selected items' id's from a provider that produces selectable items. Any items can be passed in, but only ISelectableListItem items contain a Selected attribute and can contribute to the result. The result is unique by ID, but not sorted.

Declaration
public static int[] GetSelectedIds(ISoListProvider selectableProvider)
Parameters
Type Name Description
ISoListProvider selectableProvider

Provider, whose lists are to be analyzed

Returns
Type Description
Int32[]

ID's of items that had Selected==true

GetSelectedIds(List<ISoListItem>, List<ISoListHeading>, List<ISoListItem>)

Extract the selected items' id's from a root, heading and history list. Any combination if input parameters can be null. Any items can be passed in, but only ISelectableListItem items contain a Selected attribute and can contribute to the result. The result is unique by ID, but not sorted.

Declaration
public static int[] GetSelectedIds(List<ISoListItem> rootItems, List<ISoListHeading> headingItems, List<ISoListItem> historyItems)
Parameters
Type Name Description
List<ISoListItem> rootItems

Root items to analyze, can be null

List<ISoListHeading> headingItems

Heading items to analyze, can be null

List<ISoListItem> historyItems

History items to analyze, can be null

Returns
Type Description
Int32[]
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top