Class UdefHelper
This class contains helper functions for handling user-defined fields.
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class UdefHelper : IUdefHelper
Constructors
UdefHelper()
This class contains helper functions for handling user-defined fields.
Declaration
Fields
AdminPage1LineNo
This class contains helper functions for handling user-defined fields.
Declaration
public const int AdminPage1LineNo = 10000
Field Value
Methods
CheckRevisionAsync()
This class contains helper functions for handling user-defined fields.
Declaration
public Task CheckRevisionAsync()
Returns
CheckRevisionAsync(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public Task CheckRevisionAsync(UDefType type)
Parameters
Returns
CompareUdefRows(UDefFieldRow, UDefFieldRow)
This class contains helper functions for handling user-defined fields.
Declaration
public bool CompareUdefRows(UDefFieldRow leftRow, UDefFieldRow rightRow)
Parameters
Returns
ConvertFromAdminLineNo(int)
This class contains helper functions for handling user-defined fields.
Declaration
public short ConvertFromAdminLineNo(int lineNo)
Parameters
Type |
Name |
Description |
int |
lineNo |
|
Returns
ConvertToAdminLineNo(int)
This class contains helper functions for handling user-defined fields.
Declaration
public short ConvertToAdminLineNo(int lineNo)
Parameters
Type |
Name |
Description |
int |
lineNo |
|
Returns
FindAvailableFieldAsync(UDefType, UDefFieldType)
This class contains helper functions for handling user-defined fields.
Declaration
public Task<FieldInfo> FindAvailableFieldAsync(UDefType type, UDefFieldType fieldType)
Parameters
Returns
FindAvailableFieldAsync(UDefType, UDefFieldType, bool)
Find available field of given type
Declaration
public Task<FieldInfo> FindAvailableFieldAsync(UDefType type, UDefFieldType fieldType, bool isIndexed)
Parameters
Type |
Name |
Description |
UDefType |
type |
|
UDefFieldType |
fieldType |
|
bool |
isIndexed |
Dummy parameter for backwards compatibility. Indexin no longer influences field allocation
|
Returns
GetAdminVersionAsync(UDefType)
Get the current version number for the given udef type
Declaration
public Task<int> GetAdminVersionAsync(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
Task<int> |
Current version number for the given udef type
|
GetAdminVersionsAsync()
Return an array of pairs indicating the UDefTypes present in the system, and the current version for each of them
Declaration
public Task<Dictionary<UDefType, int>> GetAdminVersionsAsync()
Returns
GetAdminVersionsAsync(params UDefType[])
This class contains helper functions for handling user-defined fields.
Declaration
public Task<Dictionary<UDefType, int>> GetAdminVersionsAsync(params UDefType[] types)
Parameters
Returns
GetAllFields(UDefType, UDefFieldType)
This class contains helper functions for handling user-defined fields.
Declaration
public IEnumerable<FieldInfo> GetAllFields(UDefType type, UDefFieldType fieldType)
Parameters
Returns
GetCurrentVersionAsync(UDefType)
Get the current version number for the given udef type
Declaration
public Task<int> GetCurrentVersionAsync(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
Task<int> |
Current version number for the given udef type
|
GetCurrentVersionsAsync()
Return an array of pairs indicating the UDefTypes present in the system, and the current version for each of them
Declaration
public Task<Dictionary<UDefType, int>> GetCurrentVersionsAsync()
Returns
GetCurrentVersionsAsync(params UDefType[])
This class contains helper functions for handling user-defined fields.
Declaration
public Task<Dictionary<UDefType, int>> GetCurrentVersionsAsync(params UDefType[] types)
Parameters
Returns
GetDefaultValue(UDefFieldRow)
Get a field's default value as a typed (parsed) object: an int, a date, or whatever. There are
no parsing exceptions thrown by this method. Multi-language parsing is performed for all
kinds of values prior to other parsing, as in the windows client.
Declaration
public object GetDefaultValue(UDefFieldRow definition)
Parameters
Type |
Name |
Description |
UDefFieldRow |
definition |
Udef field definition
|
Returns
Type |
Description |
object |
An object of the correct type for the database type of the udef field (so a
dropdown list field will get an int, which is the list item id). If the stored default is
not parseable as the target type, an 'empty' object of the correct type is returned
(0 for ints, etc.)
|
GetListName(UDefFieldRow)
Get the name of the MDO list associate with the given udef field. An empty string is returned
if the field is not a list field.
Declaration
public string GetListName(UDefFieldRow definition)
Parameters
Type |
Name |
Description |
UDefFieldRow |
definition |
User-defined field to get list name for
|
Returns
GetTableInfo(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public TableInfo GetTableInfo(UDefType type)
Parameters
Returns
GetTableInfoLarge(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public TableInfo GetTableInfoLarge(UDefType type)
Parameters
Returns
GetTableInfoLargeOrSmall(UDefType, UDefFieldType)
This class contains helper functions for handling user-defined fields.
Declaration
public TableInfo GetTableInfoLargeOrSmall(UDefType type, UDefFieldType fieldType)
Parameters
Returns
GetTableInfoSmall(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public TableInfo GetTableInfoSmall(UDefType type)
Parameters
Returns
GetTemplateVariableName(UDefType, UDefFieldType, int)
This class contains helper functions for handling user-defined fields.
Declaration
public string GetTemplateVariableName(UDefType udefType, UDefFieldType udefFieldType, int columnId)
Parameters
Returns
GetUdefType(TableInfo)
Get the udef type of the given table
Declaration
public UDefType GetUdefType(TableInfo tableInfo)
Parameters
Type |
Name |
Description |
TableInfo |
tableInfo |
Table info object
|
Returns
Type |
Description |
UDefType |
udef type of table
|
GetUdefType(int)
Get the udef type of the given table
Declaration
public UDefType GetUdefType(int tableNumber)
Parameters
Type |
Name |
Description |
int |
tableNumber |
0-based table index
|
Returns
Type |
Description |
UDefType |
udef type of table
|
GetUserPreferenceMDOListString(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public string GetUserPreferenceMDOListString(UDefType type)
Parameters
Returns
GetUserPreferenceMDOListStringAdmin(UDefType)
This class contains helper functions for handling user-defined fields.
Declaration
public string GetUserPreferenceMDOListStringAdmin(UDefType type)
Parameters
Returns
GetVersionPreferenceAdmin(UDefType)
Get the version preference string for the given udef type
Declaration
public string GetVersionPreferenceAdmin(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
string |
Preference key for the current version
|
GetVersionPreferenceCurrent(UDefType)
Get the version preference string for the given udef type
Declaration
public string GetVersionPreferenceCurrent(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
string |
Preference key for the current version
|
IncrementAdminVersionAsync(UDefType)
Set the admin version number for the given udef type
Declaration
public Task<int> IncrementAdminVersionAsync(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
Task<int> |
Current version number for the given udef type
|
IncrementCurrentVersionAsync(UDefType)
Set the current version number for the given udef type to the adminversion.
Declaration
public Task<int> IncrementCurrentVersionAsync(UDefType type)
Parameters
Type |
Name |
Description |
UDefType |
type |
Udef type, should be one of the "valid" ones
|
Returns
Type |
Description |
Task<int> |
Current version number for the given udef type
|
IsLargeTableColumn(int)
This class contains helper functions for handling user-defined fields.
Declaration
public bool IsLargeTableColumn(int columnId)
Parameters
Type |
Name |
Description |
int |
columnId |
|
Returns
IsPageOneMDOAsync(UDefType, CancellationToken)
This class contains helper functions for handling user-defined fields.
Declaration
public Task<bool> IsPageOneMDOAsync(UDefType type, CancellationToken cancellationToken = default)
Parameters
Returns
IsSmallTableColumn(int)
This class contains helper functions for handling user-defined fields.
Declaration
public bool IsSmallTableColumn(int columnId)
Parameters
Type |
Name |
Description |
int |
columnId |
|
Returns
IsUnpublishedPageOneMDOAsync(UDefType, CancellationToken)
This class contains helper functions for handling user-defined fields.
Declaration
public Task<bool> IsUnpublishedPageOneMDOAsync(UDefType type, CancellationToken cancellationToken = default)
Parameters
Returns
SetAdminVersionAsync(UDefType, int, CancellationToken)
Set the admin version number for the given udef type
Declaration
public Task SetAdminVersionAsync(UDefType type, int version, CancellationToken cancellationToken = default)
Parameters
Returns
Type |
Description |
Task |
Current version number for the given udef type
|
SetCurrentVersionAsync(UDefType, int, CancellationToken)
Set the current version number for the given udef type
Declaration
public Task SetCurrentVersionAsync(UDefType type, int version, CancellationToken cancellationToken = default)
Parameters
Returns
Type |
Description |
Task |
Current version number for the given udef type
|
SetRankOnFieldsAsync(UDefType, int[])
This class contains helper functions for handling user-defined fields.
Declaration
public Task SetRankOnFieldsAsync(UDefType ownerType, int[] rankedFieldsIds)
Parameters
Type |
Name |
Description |
UDefType |
ownerType |
|
int[] |
rankedFieldsIds |
|
Returns
SuggestLocation(UDefType, out int, out int, int, int, out int, out int)
This class contains helper functions for handling user-defined fields.
Declaration
public void SuggestLocation(UDefType type, out int labelLeft, out int labelTop, int labelWidth, int labelHeight, out int fieldLeft, out int fieldTop)
Parameters
TranslateFieldTypeToDatabaseType(UDefFieldType)
This class contains helper functions for handling user-defined fields.
Declaration
public UDefFieldDatabaseType TranslateFieldTypeToDatabaseType(UDefFieldType fieldType)
Parameters
Returns
Implements
Extension Methods