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.
Inherited Members
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public static class SelectableListHelper
Methods
ConvertToSelectable(ISoListProvider, int[], 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 |
int[] | 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 |
---|---|
int[] |
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 |
---|---|
int[] | 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 |
---|---|
int[] |