/// <summary> /// Create and setup the titles for vertical dimensions /// </summary> /// <param name="model"> /// The DataSetModel to use /// </param> /// <returns> /// The row with the titles /// </returns> private TableRow CreateVerticalTitles(IDataSetModel model) { var verticalTitles = new TableRow(); verticalTitles.AddClass(HtmlClasses.VerticalKeys); foreach (string dim in model.VerticalKeys) { TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, HtmlClasses.VerticalKeyTitle); // new TD(); verticalTitles.AddElement(tableCell); } return(verticalTitles); }
/// <summary> /// Create and setup the titles for horizontal dimensions /// </summary> /// <param name="model"> /// The DataSetModel to use /// </param> /// <param name="horizontalRows"> /// The horizontal map to add the titles to /// </param> /// <param name="horizontalOrderedRows"> /// The list of rows /// </param> private void CreateHorizontalTitles( IDataSetModel model, IDictionary <string, TableRow> horizontalRows, ICollection <TableRow> horizontalOrderedRows) { foreach (string dim in model.HorizontalKeys) { var row = new TableRow(); row.AddClass(HtmlClasses.HorizontalKeys); // First cell is the title, which spawns over all columns used for vertical keys... TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, "hkeytitle"); tableCell.SetColSpan(Math.Max(1, model.VerticalKeys.Count)); row.AddCell(tableCell); horizontalRows.Add(dim, row); horizontalOrderedRows.Add(row); } }
/// <summary> /// Create the container table. The container table holds the slice header and slice data tables. /// </summary> /// <returns> /// The table that holds the slice header and data /// </returns> private static Table CreateContainerTable() { var containerTable = new Table(); containerTable.AddClass(HtmlClasses.Container); containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue); containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue); var sliceRow = new TableRow(); containerTable.AddElement(sliceRow); var skeys = new TableCell(); skeys.AddClass(HtmlClasses.SliceKeys); sliceRow.AddElement(skeys); var hvkeys = new TableRow(new TableCell()); hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys); containerTable.AddElement(hvkeys); return(containerTable); }
private TableRow CreateAttributeRow(string concept, string code, string codeDesc, bool highlighted = false) { TableRow tr = new TableRow(); if (highlighted) tr.AddClass(HtmlClasses.ExtraInfoTableRowHighlighted); TableCell cell_concept = new TableCell(concept); cell_concept.AddClass(HtmlClasses.ExtraInfoTableLabelConcept); TableCell cell_concept_value = new TableCell(string.Format("[{0}] - {1}", code, codeDesc)); cell_concept_value.AddClass(HtmlClasses.ExtraInfoTableLabelConceptValue); tr.AddCell(cell_concept); tr.AddCell(cell_concept_value); return tr; }
/// <summary> /// Create the container table. The container table holds the slice header and slice data tables. /// </summary> /// <returns> /// The table that holds the slice header and data /// </returns> private static Table CreateContainerTable() { var containerTable = new Table(); containerTable.AddClass(HtmlClasses.Container); containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue); containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue); var sliceRow = new TableRow(); containerTable.AddElement(sliceRow); var skeys = new TableCell(); skeys.AddClass(HtmlClasses.SliceKeys); sliceRow.AddElement(skeys); var hvkeys = new TableRow(new TableCell()); hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys); containerTable.AddElement(hvkeys); return containerTable; }
/// <summary> /// Create and setup the titles for vertical dimensions /// </summary> /// <param name="model"> /// The DataSetModel to use /// </param> /// <returns> /// The row with the titles /// </returns> private TableRow CreateVerticalTitles(IDataSetModel model) { var verticalTitles = new TableRow(); verticalTitles.AddClass(HtmlClasses.VerticalKeys); foreach (string dim in model.VerticalKeys) { TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, HtmlClasses.VerticalKeyTitle); // new TD(); verticalTitles.AddElement(tableCell); } return verticalTitles; }
/// <summary> /// Create and setup the titles for horizontal dimensions /// </summary> /// <param name="model"> /// The DataSetModel to use /// </param> /// <param name="horizontalRows"> /// The horizontal map to add the titles to /// </param> /// <param name="horizontalOrderedRows"> /// The list of rows /// </param> private void CreateHorizontalTitles( IDataSetModel model, IDictionary<string, TableRow> horizontalRows, ICollection<TableRow> horizontalOrderedRows) { foreach (string dim in model.HorizontalKeys) { var row = new TableRow(); row.AddClass(HtmlClasses.HorizontalKeys); // First cell is the title, which spawns over all columns used for vertical keys... TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, "hkeytitle"); tableCell.SetColSpan(Math.Max(1, model.VerticalKeys.Count)); row.AddCell(tableCell); horizontalRows.Add(dim, row); horizontalOrderedRows.Add(row); } }