private void RellenaEtiquetasPlaceHolder() { if (this.idindicator.HasValue) { try { using (Clases.cKPI_INDICATOR_ETIQUETAS objEtiquetas = new Clases.cKPI_INDICATOR_ETIQUETAS()) { objEtiquetas.indicatorid = this.idindicator.Value; System.Data.DataTableReader dtrValores = objEtiquetas.ObtenerDatos().CreateDataReader(); while (dtrValores.Read()) { HyperLink NuevoEnlace = new HyperLink(); NuevoEnlace.Text = dtrValores.GetValue(2).ToString(); NuevoEnlace.NavigateUrl = "~/search.aspx?tagstring=" + dtrValores.GetValue(2).ToString(); NuevoEnlace.CssClass = "tag"; PlaceHolderEtiquetas.Controls.Add(NuevoEnlace); } } } catch (Exception excp) { ExceptionUtility.LogException(excp, "Error en la función << RellenaEtiquetasPlaceHolder() >>"); } finally { if (PlaceHolderEtiquetas.Controls.Count > 0) { lbNumEtiquetasNoEditable.Text = PlaceHolderEtiquetas.Controls.Count.ToString(); } else { PanelEtiquetasNoEditable.Visible = false; } } } else { Response.Redirect("~/errors/notfound.aspx"); } }
private void RellenaEtiquetasEditables() { if (this.idindicator.HasValue) { string sComa = string.Empty; string sKeywords = string.Empty; int NumEtiquetas = 0; try { using (Clases.cKPI_INDICATOR_ETIQUETAS objEtiquetas = new Clases.cKPI_INDICATOR_ETIQUETAS()) { objEtiquetas.indicatorid = this.idindicator.Value; System.Data.DataTableReader dtrValores = objEtiquetas.ObtenerDatos().CreateDataReader(); while (dtrValores.Read()) { sKeywords += sComa + dtrValores.GetValue(2).ToString(); sComa = ", "; NumEtiquetas++; } } } catch (Exception excp) { ExceptionUtility.LogException(excp, "Error en la función << RellenaEtiquetasEditables() >>"); } finally { txtEtiquetasEditable.Text = sKeywords; Page.MetaKeywords = sKeywords; lbNumEtiquetasEditable.Text = NumEtiquetas.ToString(); } } else { Response.Redirect("~/errors/notfound.aspx"); } }