示例#1
0
 /// <summary>
 ///
 /// <see cref="https://academy.creatio.com/documents/technic-sdk/7-15/dataservice-reading-records"/>
 /// </summary>
 /// <param name="columnPath">Path to the column in relation to the root schema <see cref=""/></param>
 /// <param name="expressionType">Type of expression that determines the value that the added column will contain.</param>
 /// <param name="orderPosition">Sets position number in the collection of the query columns, by which the sorting is done.</param>
 /// <param name="orderDirection">Sorting order</param>
 public QueryColumnAttribute(string columnPath, Enums.EntitySchemaQueryExpressionType expressionType = Enums.EntitySchemaQueryExpressionType.SchemaColumn,
                             int orderPosition = 0, Enums.OrderDirection orderDirection = Enums.OrderDirection.Ascending
                             )
 {
     ColumnPath     = columnPath;
     ExpressionType = expressionType;
     OrderPosition  = orderPosition;
     OrderDirection = orderDirection;
 }
示例#2
0
 /// <summary>
 /// Reorders a list of attachments on a property
 /// </summary>
 /// <param name="attachments"></param>
 /// <param name="reorderField"></param>
 public ICollection <AttachmentResponse> Reorder(List <AttachmentResponse> attachments, string reorderField, Enums.OrderDirection direction)
 {
     return(direction == Enums.OrderDirection.Asc ? attachments.AsQueryable().OrderBy(reorderField).ToList() : attachments.AsQueryable().OrderByDescending(d => d.FileName).ToList());
 }