/// <summary> /// Asigna el ORDER BY /// </summary> public DimensionRequestBuilder WithOrderBy(BaseColumnRequestModel.SortOrder orderBy = BaseColumnRequestModel.SortOrder.Undefined) { // Asigna la ordenación Column.OrderBy = orderBy; // Devuelve el generador return(this); }
/// <summary> /// Obtiene la cláusula de ordenación /// </summary> private string GetSortClause(BaseColumnRequestModel.SortOrder orderBy) { if (orderBy == BaseColumnRequestModel.SortOrder.Ascending) { return("ASC"); } else { return("DESC"); } }
/// <summary> /// Obtiene la imagen asociada a la ordenación /// </summary> private object GetIcon(BaseColumnRequestModel.SortOrder sort) { switch (sort) { case BaseColumnRequestModel.SortOrder.Ascending: return("/DbStudio.Views;component/Resources/Images/SortAscending.png"); case BaseColumnRequestModel.SortOrder.Descending: return("/DbStudio.Views;component/Resources/Images/SortDescending.png"); default: return("/DbStudio.Views;component/Resources/Images/NoSort.png"); } }
internal QueryFieldModel(QueryModel query, bool primaryKey, string table, string field, BaseColumnRequestModel.SortOrder orderBy, ExpressionColumnRequestModel.AggregationType aggregation, bool visible) { Query = query; IsPrimaryKey = primaryKey; Table = table; Field = field; Aggregation = aggregation; Visible = visible; if (Visible) { OrderBy = orderBy; } }