This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-09-03 08:54:14 -07:00
parent 16fda384c2
commit 12988377b3
8 changed files with 1161 additions and 588 deletions

View File

@@ -14,13 +14,44 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Set(value As Integer)
ViewState("CveCuenta") = 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 listaCampos As List(Of String())
Get
Return DirectCast(ViewState("listaCampos"), List(Of String()))
End Get
Set(value As List(Of String()))
ViewState("listaCampos") = 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)
listaCampos = 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, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
@@ -91,11 +122,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
RegistraScript($"LimpiaCeros();")
Conta.Dispose()
End Sub
End Sub
#End Region
#Region " GV ROW DATABOUND "
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -103,11 +134,29 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
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")
setgrafica(e)
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
End If
End Sub
Public Sub setgrafica(e As GridViewRowEventArgs)
Dim lista As New List(Of Object)
lista.Add(New With {.Texto = "Enero", .Valor = e.Row.DBCampo("Enero").ToDecimal(), .Color = "#FF0F00"})
lista.Add(New With {.Texto = "Febrero", .Valor = e.Row.DBCampo("Febrero").ToDecimal(), .Color = "#FF6600"})
lista.Add(New With {.Texto = "Marzo", .Valor = e.Row.DBCampo("Marzo").ToDecimal(), .Color = "#F8FF01"})
lista.Add(New With {.Texto = "Abril", .Valor = e.Row.DBCampo("Abril").ToDecimal(), .Color = "#04D215"})
lista.Add(New With {.Texto = "Mayo", .Valor = e.Row.DBCampo("Mayo").ToDecimal(), .Color = "#2A0CD0"})
lista.Add(New With {.Texto = "Junio", .Valor = e.Row.DBCampo("Junio").ToDecimal(), .Color = "#8A0CCF"})
lista.Add(New With {.Texto = "Julio", .Valor = e.Row.DBCampo("Julio").ToDecimal(), .Color = "#CD0D74"})
lista.Add(New With {.Texto = "Agosto", .Valor = e.Row.DBCampo("Agosto").ToDecimal(), .Color = "#754DEB"})
lista.Add(New With {.Texto = "Septiembre", .Valor = e.Row.DBCampo("Septiembre").ToDecimal(), .Color = "#DDDDDD"})
lista.Add(New With {.Texto = "Octubre", .Valor = e.Row.DBCampo("Octubre").ToDecimal(), .Color = "#999999"})
lista.Add(New With {.Texto = "Noviembre", .Valor = e.Row.DBCampo("Noviembre").ToDecimal(), .Color = "#000000"})
lista.Add(New With {.Texto = "Diciembre", .Valor = e.Row.DBCampo("Diciembre").ToDecimal(), .Color = "#FF0F00"})
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
End Sub
#End Region
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click