/// <summary> /// Add a sort order to the Query, based on a static field. /// </summary> /// <param name="fieldName"> /// the field name to passe would be the exact name of the field in the object properties. /// For example, if you have a property "Ticket.Date_Created", you will need to pass "Date_Created". /// </param> /// <param name="sortDirection"></param> public bool AddSortOrder(string fieldName, ParaEnums.QuerySortBy sortDirection) { if (_SortByFields.Count < 5) { _SortByFields.Add(fieldName + "_" + sortDirection.ToString().ToLower() + "_"); return true; } else { return false; } }
/// <summary> /// Add a sort order to the Query, based on a custom field. /// </summary> /// <param name="customFieldId">The id of the custom field you would like to filter upon.</param> /// <param name="sortDirection"></param> public bool AddSortOrder(Int64 customFieldId, ParaEnums.QuerySortBy sortDirection) { if (_SortByFields.Count < 5) { _SortByFields.Add("FID" + customFieldId + "_" + sortDirection.ToString().ToLower() + "_"); return true; } else { return false; } }