Class EntityRankOrderer
Helper method for sorting items in a table EntityRankOrderer. Method will take care of gaps and duplicate values by ordering all rows starting from 1 It will only update rows having actual changes
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public static class EntityRankOrderer : Object
Methods
SetItemPosition(FieldInfo, Int32, Int32)
Re-order items in a table, based on some int rank/sortorder field
Declaration
public static void SetItemPosition(FieldInfo orderField, int pkToMove, int newPosition)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | orderField | The field that is used to order the items |
Int32 | pkToMove | The primary key of the item to be moved |
Int32 | newPosition | The new position (1-based) of the item to be moved |