Class UserGroupProvider
List provider for the UserGroup table. While this table looks like an MDO table, it lacks the standardized grouplink and headinglink companion tables (for good reason, since it is the group table itself).
Inherited Members
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
[MDOProviderPlugin("UserGroup")]
[MDOAdditionalInfo("exclude_id", "Exclude the given user-group id", 1234)]
[MDOAdditionalInfo("exclude_ids", "Exclude the given comma-separated user-group id", "12,34,69")]
[MDOAdditionalInfo("addblankstring", "Add a blank item", true)]
[MDOAdditionalInfo("addRootTarget", "Add a root target item", false)]
public class UserGroupProvider : AnyTableListProviderBase, ISoListProvider, ISoList
Constructors
UserGroupProvider()
List provider for the UserGroup table. While this table looks like an MDO table, it lacks the standardized grouplink and headinglink companion tables (for good reason, since it is the group table itself).
Declaration
public UserGroupProvider()
Fields
ProviderName
List provider for the UserGroup table. While this table looks like an MDO table, it lacks the standardized grouplink and headinglink companion tables (for good reason, since it is the group table itself).
Declaration
public const string ProviderName = "UserGroup"
Field Value
Type | Description |
---|---|
string |
Properties
TableInfo
The main table info of the query. This is used by subclasses (e.g. this class) when restricting history data.
Declaration
protected override TableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
Methods
GetMainQuery()
Subclass contract: Get main query. We only fetch the neeeded fields, and use ascending sort by name, always
Declaration
protected override Select GetMainQuery()
Returns
Type | Description |
---|---|
Select | Query primed with return fields and orderby |
Overrides
Init()
Subclass contract: Initialize (nothing much here)
Declaration
protected override void Init()
Overrides
OnPostGetRootItems(List<ISoListItem>)
Event raised by GetRootItems() after values are fetched from the database.
Declaration
protected override void OnPostGetRootItems(List<ISoListItem> items)
Parameters
Type | Name | Description |
---|---|---|
List<ISoListItem> | items | List of items returned from GetRootItems(). |
Overrides
OnPreGetRootItems(List<ISoListItem>)
Event raised by GetRootItems after values are fetched from the database. Adding option for empty group at the beginning of list
Declaration
protected override void OnPreGetRootItems(List<ISoListItem> items)
Parameters
Type | Name | Description |
---|---|---|
List<ISoListItem> | items | List of items returned from GetRootItems. |
Overrides
OnRead(SoDataReader, short)
Subclass contract: Create a new item. For each row read, we construct a simple List item based on the id, name and tooltip. Ranks
Declaration
protected override ISoListItem OnRead(SoDataReader reader, short lastRank)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | |
short | lastRank |
Returns
Type | Description |
---|---|
ISoListItem |
Overrides
SetSearchRestriction(Select, string)
Subclass contract: Set restriction in case of search. This method is always called, but we only set a restriction (on start with name) if there is nonempty string.
Declaration
protected override void SetSearchRestriction(Select sql, string searchValue)
Parameters
Type | Name | Description |
---|---|---|
Select | sql | Query to modify |
string | searchValue | Search value to set |