+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
diff --git a/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb b/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
index 9ab4095e6..300c3e6ff 100644
--- a/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
+++ b/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
@@ -22,12 +22,45 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Set(value As Integer)
ViewState("EsVertical") = value
End Set
- End Property
+ End Property
+
+
+ Private Property listacolores As List(Of String)
+ Get
+ Return DirectCast(ViewState("listacolores"), List(Of String))
+ End Get
+ Set(value As List(Of String))
+ ViewState("listacolores") = value
+ End Set
+ End Property
+ Private Property listaCamposanios As List(Of String())
+ Get
+ Return DirectCast(ViewState("listaCamposanios"), List(Of String()))
+ End Get
+ Set(value As List(Of String()))
+ ViewState("listaCamposanios") = value
+ End Set
+ End Property
+
#End Region
-
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
-
+ If Not IsPostBack Then
+
+ listacolores = New List(Of String)
+ listaCamposanios = New List(Of String())
+ listacolores.Add("#FF0F00")
+ listacolores.Add("#FF6600")
+ listacolores.Add("#F8FF01")
+ listacolores.Add("#04D215")
+ listacolores.Add("#2A0CD0")
+ listacolores.Add("#8A0CCF")
+ listacolores.Add("#CD0D74")
+ listacolores.Add("#754DEB")
+ listacolores.Add("#DDDDDD")
+ listacolores.Add("#999999")
+ listacolores.Add("#000000")
+ listacolores.Add("#FF0F00")
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
@@ -95,26 +128,27 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
GvAnual.DataSource = Conta.DSResultados.Tables(1)
- Dim Index = 1
- For Index = 1 To GvAnual.Columns.Count - 1
+ Dim Index = 2
+ For Index = 2 To GvAnual.Columns.Count - 1
GvAnual.Columns(Index).Visible = False
Next Index
-
- Index = 1
+ listaCamposanios.Clear()
+ Index = 2
For Each Dr As DataRow In DtHeaders.Rows
GvAnual.Columns(Index).Visible = True
- CType(GvAnual.Columns(Index), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}"
- GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
+ CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio"))
+ GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
+ listaCamposanios.Add(New String() {String.Format("Ejercicio{0}", Dr("Ejercicio")), Dr("Ejercicio").ToString()})
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
If EsVertical <> 1 Then
GvAnual.Columns(Index + 1).Visible = True
- CType(GvAnual.Columns(Index + 1), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}VariacionImporte"
+ CType(GvAnual.Columns(Index + 1), BoundField).DataField = String.Format("Ejercicio{0}VariacionImporte", Dr("Ejercicio"))
GvAnual.Columns(Index + 1).HeaderText = "$"
End If
GvAnual.Columns(Index + 2).Visible = True
- CType(GvAnual.Columns(Index + 2), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}{If(EsVertical = 1, "", "Variacion")}Porcentaje"
+ CType(GvAnual.Columns(Index + 2), BoundField).DataField = String.Format("Ejercicio{0}{1}Porcentaje", Dr("Ejercicio"), If(EsVertical = 1, "", "Variacion"))
GvAnual.Columns(Index + 2).HeaderText = "%"
End If
@@ -154,16 +188,30 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
#Region " GV ROW DATABOUND "
Protected Sub GvAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAnual.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
-
+ setgraficaCC(e)
If e.Row.RowIndex = 0 Then
e.Row.Style.Add("font-weight", "bold")
End If
- e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
+ e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
End If
End Sub
+
+ Public Sub setgraficaCC(e As GridViewRowEventArgs)
+ Dim lista As New List(Of Object)
+ Dim colorindex As Integer = 0
+ For Each campo As String() In listaCamposanios
+ lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
+ colorindex = colorindex + 1
+ If colorindex >= listacolores.Count Then
+ colorindex = 0
+ End If
+ Next
+ e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
+ End Sub
+
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Dim SubProyecto As String = ""
diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx b/Contabilidad2/RepAnexoCatalogoCC.aspx
index 3112f9121..b31a79e72 100644
--- a/Contabilidad2/RepAnexoCatalogoCC.aspx
+++ b/Contabilidad2/RepAnexoCatalogoCC.aspx
@@ -1,53 +1,68 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" %>
-
-
-
-
-
-
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" %>
+
+
+
+
+
+
+
+
Anexo de Catálogo - Centro Costo
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+