Show / Hide Table of Contents

Class ArchiveConfigurationHelper

This class provides functionality for fetching and saving the current configuration of a particular archive gui control and its parent data provider. It is the standard, but not mandatory, source and sink of such configuration data. It is also the sink for the result of the archive configuration dialog (both the display and orderby tabs).

Inheritance
Object
ArchiveConfigurationHelper
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public static class ArchiveConfigurationHelper : Object

Methods

GetChosenColumns(String, String, String, Int32)

Get the current configuration for a given archive

Declaration
public static List<ArchiveColumnInfo> GetChosenColumns(string guiControlName, string archiveName, string context = "", int selectionId = 0)
Parameters
Type Name Description
String guiControlName

Gui name of the archive control

String archiveName

Archive data provider name, will be passed to the ArchiveProviderFactory.

String context
Int32 selectionId
Returns
Type Description
List<ArchiveColumnInfo>

List of column information. The list is sorted according to the order in which columns have been configured by the user, and all percentage widths are rescaled so they add up to exactly 100 (or 0 if there are no percentage-width columns).

GetChosenColumns(String, String, out String, String, Int32)

This class provides functionality for fetching and saving the current configuration of a particular archive gui control and its parent data provider. It is the standard, but not mandatory, source and sink of such configuration data. It is also the sink for the result of the archive configuration dialog (both the display and orderby tabs).

Declaration
public static List<ArchiveColumnInfo> GetChosenColumns(string guiControlName, string archiveName, out string ownerKeys, string context = "", int selectionId = 0)
Parameters
Type Name Description
String guiControlName
String archiveName
String ownerKeys
String context
Int32 selectionId
Returns
Type Description
List<ArchiveColumnInfo>

GetChosenEntities(String, String)

Retrieve a list of entities, marking each as chosen or not

Declaration
public static List<ArchiveRowTypeInfo> GetChosenEntities(string guiControlName, string archiveName)
Parameters
Type Name Description
String guiControlName

GUI name of control

String archiveName

Archive provider

Returns
Type Description
List<ArchiveRowTypeInfo>

List of chosen entities, including mandatory ones

GetOrderBy(String, Int32)

Retrieve the current orderby configuration for a given archive

Declaration
public static List<ArchiveOrderByInfo> GetOrderBy(string guiControlName, int selectionId = 0)
Parameters
Type Name Description
String guiControlName

The gui name of the archive control

Int32 selectionId
Returns
Type Description
List<ArchiveOrderByInfo>

List of orderby information, sorted according to the rank of the orderby criteria

SaveColumnWidths(String, Dictionary<String, String>, String, Int32)

Save the current column widths for the indicated columns

Declaration
public static void SaveColumnWidths(string guiControlName, Dictionary<string, string> columnNameWidths, string context = "", int selectionId = 0)
Parameters
Type Name Description
String guiControlName

Gui name of the archive control

Dictionary<String, String> columnNameWidths

Dictionary of widths. The key is the column programmatic name, as defined in Name, the width is either 'n%' or 'nc', indicating a percentage or number of characters.

String context
Int32 selectionId

SetChosenColumns(String, List<ISelectableListItem>, String, Int32)

Based on a list of properly formatted ISelectableListItem items and a gui control name, save the current configuration of that archive in the database on behalf of the current user.

Declaration
public static void SetChosenColumns(string guiControlName, List<ISelectableListItem> columns, string context = "", int selectionId = 0)
Parameters
Type Name Description
String guiControlName

Name of the archive gui control

List<ISelectableListItem> columns

List of items. The Selected property of each item determines whether the corresponding column (found in ) is selected for display. The property determines whether the column is part of the orderby criteria. A value of 'n:A' or 'n:D' where n is a 1-based integer defines the corresponding column as the n'th orderby criterion, Ascending or Descending order.

String context
Int32 selectionId

SetChosenEntities(String, String, List<ISelectableListItem>, String, Int32)

Store a list of chosen (or not) entities in the database.

Declaration
public static void SetChosenEntities(string providerName, string guiControlName, List<ISelectableListItem> entities, string context = "", int selectionId = 0)
Parameters
Type Name Description
String providerName
String guiControlName

GUI name of control

List<ISelectableListItem> entities

List of entities

String context
Int32 selectionId
Remarks

All entities get rows, regardless of choice, so we can differentiate between intentionally disabled and those that simply have not been seen before, thereby enabling a default of 'show' for optional entities. ///

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top