diff --git a/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx b/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx
deleted file mode 100644
index 32123d23c..000000000
--- a/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx
+++ /dev/null
@@ -1,1593 +0,0 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal - Copy.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Generar Excel
-
-
- Graficar
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ejercicio Inicio:
-
-
- Ejercicio Fin:
-
-
- Periodo:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Divisor:
-
-
-
- Trimestre
- Cuatrimestre:
-
-
-
- NO
- Trimestre
- Cuatrimestre
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Resultados del Ejercicio:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Resultados del Ejercicio:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Resultados del Ejercicio:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
-
- <%-- --%>
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%--
-
-
-
-
- --%>
-
- <%-- --%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Seleccione el tipo de gráfica:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx.vb
deleted file mode 100644
index bb9bbfec4..000000000
--- a/Contabilidad2/RepEstadoResultadosHorizontal - Copy.aspx.vb
+++ /dev/null
@@ -1,2295 +0,0 @@
-Option Explicit On
-Option Strict On
-
-Imports System.Data
-Imports System.Drawing
-Imports System.IO
-Imports Extensiones
-Imports GemBox.Spreadsheet
-Imports Microsoft.Reporting.WebForms
-
-Partial Class Contabilidad_RepEstadoResultadosHorizontal
- Inherits ClsPaginas
-
-#Region "PROPIEDADES"
-
-
- Private Property DtDatosMes As DataTable
- Get
- DtDatosMes = DirectCast(ViewState("DtDatosMes"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtDatosMes") = value
- End Set
- End Property
-
- Private Property DtIngresosMes As DataTable
- Get
- DtIngresosMes = DirectCast(ViewState("DtIngresosMes"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtIngresosMes") = value
- End Set
- End Property
- Private Property DtGastosMes As DataTable
- Get
- DtGastosMes = DirectCast(ViewState("DtGastosMes"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtGastosMes") = value
- End Set
- End Property
- Private Property TotalActualMes As Double
- Get
- TotalActualMes = ViewState("TotalActualMes").ToString.ToDouble
- End Get
- Set(value As Double)
- ViewState("TotalActualMes") = value
- End Set
- End Property
- Private Property TotalAnteriorMes As Double
- Get
- TotalAnteriorMes = ViewState("TotalAnteriorMes").ToString.ToDouble
- End Get
- Set(value As Double)
- ViewState("TotalAnteriorMes") = value
- End Set
- End Property
- Private Property FechaIMes As String
- Get
- Return ViewState("FechaIMes").ToString
- End Get
- Set(value As String)
- ViewState("FechaIMes") = value
- End Set
- End Property
- Private Property FechaFMes As String
- Get
- Return ViewState("FechaFMes").ToString
- End Get
- Set(value As String)
- ViewState("FechaFMes") = value
- End Set
- 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
- 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
- Private Property listaCamposaniosGastos As List(Of String())
- Get
- Return DirectCast(ViewState("listaCamposaniosGastos"), List(Of String()))
- End Get
- Set(value As List(Of String()))
- ViewState("listaCamposaniosGastos") = value
- End Set
- End Property
- Private Property listaCamposaniosTotal As List(Of String())
- Get
- Return DirectCast(ViewState("listaCamposaniosTotal"), List(Of String()))
- End Get
- Set(value As List(Of String()))
- ViewState("listaCamposaniosTotal") = value
- End Set
- End Property
-
- 'Private Property ReporteComplementario As Boolean
- ' Get
- ' ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
- ' End Get
- ' Set(value As Boolean)
- ' ViewState("ReporteComplementario") = value
- ' End Set
- 'End Property
-
-#End Region
-
-
-#Region " M E S H O R I Z O N T A L "
-
- Private Property DtDatosMesH As DataTable
- Get
- DtDatosMesH = DirectCast(ViewState("DtDatosMesH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtDatosMesH") = value
- End Set
- End Property
-
- Private Property DtIngresosMesH As DataTable
- Get
- DtIngresosMesH = DirectCast(ViewState("DtIngresosMesH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtIngresosMesH") = value
- End Set
- End Property
-
- Private Property DtGastosMesH As DataTable
- Get
- DtGastosMesH = DirectCast(ViewState("DtGastosMesH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtGastosMesH") = value
- End Set
- End Property
-
- Private Property DTTotalesMesH As DataTable
- Get
- DTTotalesMesH = DirectCast(ViewState("DTTotalesMesH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DTTotalesMesH") = value
- End Set
- End Property
-
-#End Region
-
-
-#Region " A N U A L H O R I Z O N T A L "
-
- Private Property DtDatosAnualH As DataTable
- Get
- DtDatosAnualH = DirectCast(ViewState("DtDatosAnualH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtDatosAnualH") = value
- End Set
- End Property
-
- Private Property DtIngresosAnualH As DataTable
- Get
- DtIngresosAnualH = DirectCast(ViewState("DtIngresosAnualH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtIngresosAnualH") = value
- End Set
- End Property
-
- Private Property DtGastosAnualH As DataTable
- Get
- DtGastosAnualH = DirectCast(ViewState("DtGastosAnualH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtGastosAnualH") = value
- End Set
- End Property
-
- Private Property DTTotalesAnualH As DataTable
- Get
- DTTotalesAnualH = DirectCast(ViewState("DTTotalesAnualH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DTTotalesAnualH") = value
- End Set
- End Property
-
-
- Private Property CountDinamicoAnual As Integer
-
- Get
- If ViewState("CountDinamicoAnual") Is Nothing Then
- Return 0
- Else
- Return ViewState("CountDinamicoAnual").ToString.ToEntero
- End If
-
- End Get
- Set(value As Integer)
- ViewState("CountDinamicoAnual") = value
- End Set
- End Property
-
-#End Region
-
-#Region " S U B P R O Y E C T O H O R I Z O N T A L "
-
- Private Property DtDatosSubProyectoH As DataTable
- Get
- DtDatosSubProyectoH = DirectCast(ViewState("DtDatosSubProyectoH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtDatosSubProyectoH") = value
- End Set
- End Property
-
- Private Property DtIngresosSubProyectoH As DataTable
- Get
- DtIngresosSubProyectoH = DirectCast(ViewState("DtIngresosSubProyectoH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtIngresosSubProyectoH") = value
- End Set
- End Property
-
- Private Property DtGastosSubProyectoH As DataTable
- Get
- DtGastosSubProyectoH = DirectCast(ViewState("DtGastosSubProyectoH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DtGastosSubProyectoH") = value
- End Set
- End Property
-
- Private Property DTTotalesSubProyectoH As DataTable
- Get
- DTTotalesSubProyectoH = DirectCast(ViewState("DTTotalesSubProyectoH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DTTotalesSubProyectoH") = value
- End Set
- End Property
-
- Private Property DTSubProyectosCabecerasH As DataTable
-
- Get
- DTSubProyectosCabecerasH = DirectCast(ViewState("DTSubProyectosCabecerasH"), DataTable)
- End Get
-
- Set(ByVal value As DataTable)
- ViewState("DTSubProyectosCabecerasH") = value
- End Set
-
- End Property
-
-
- Private Property CountDinamicoSubProyecto As Integer
-
- Get
- If ViewState("CountDinamicoSubProyecto") Is Nothing Then
- Return 0
- Else
- Return ViewState("CountDinamicoSubProyecto").ToString.ToEntero
- End If
-
- End Get
- Set(value As Integer)
- ViewState("CountDinamicoSubProyecto") = value
- End Set
- End Property
-
-
-#End Region
-
-
- Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
- If Not Page.IsPostBack Then
- listacolores = New List(Of String)
- listaCampos = New List(Of String())
- listaCamposanios = New List(Of String())
- listaCamposaniosGastos = New List(Of String())
- listaCamposaniosTotal = 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")
-
- TotalActualMes = 0
- TotalAnteriorMes = 0
-
- CargaEjercicios()
-
- CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
- TabSubProyecto.HeaderText = LblSubProyecto.Text & " "
-
-
-
- DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
- ValidaEjercicios()
-
- End If
- End Sub
-
- Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs)
-
- If TAB.ActiveTabIndex = 0 Then
- LiSubProyectoDdl.Visible = True
- LiSubProyectoLbl.Visible = True
-
- LiEjercicioDdl.Visible = True
- LiEjercicioLbl.Visible = True
-
- LiEjercicioDdl2.Visible = False
- LiEjercicioLbl2.Visible = False
-
- LiPeriodoDdl.Visible = True
- LiPeriodoLbl.Visible = True
-
- LiDivisorDdl.Visible = True
- LiDivisorLbl.Visible = True
-
- LblTri.Visible = False
- DVTri.Visible = False
- End If
-
- If TAB.ActiveTabIndex = 1 Then
-
- LiSubProyectoDdl.Visible = True
- LiSubProyectoLbl.Visible = True
-
- LiEjercicioDdl.Visible = True
- LiEjercicioLbl.Visible = True
-
- LiEjercicioDdl2.Visible = False
- LiEjercicioLbl2.Visible = False
-
- LiPeriodoDdl.Visible = True
- LiPeriodoLbl.Visible = True
-
- LiDivisorDdl.Visible = True
- LiDivisorLbl.Visible = True
-
- DdlPeriodo.SelectedValueExist(12)
-
- LblTri.Visible = True
- DVTri.Visible = True
-
-
- End If
-
- If TAB.ActiveTabIndex = 2 Then
-
- ValidaEjercicios()
-
- LiSubProyectoDdl.Visible = True
- LiSubProyectoLbl.Visible = True
-
- LiEjercicioDdl.Visible = True
- LiEjercicioLbl.Visible = True
-
- LiEjercicioDdl2.Visible = True
- LiEjercicioLbl2.Visible = True
-
- LiPeriodoDdl.Visible = True
- LiPeriodoLbl.Visible = True
-
- LiDivisorDdl.Visible = True
- LiDivisorLbl.Visible = True
-
- LblTri.Visible = False
- DVTri.Visible = False
-
- End If
-
- If TAB.ActiveTabIndex = 3 Then
- LiSubProyectoDdl.Visible = True
- LiSubProyectoLbl.Visible = True
-
- LiEjercicioDdl.Visible = True
- LiEjercicioLbl.Visible = True
-
- LiEjercicioDdl2.Visible = False
- LiEjercicioLbl2.Visible = False
-
- LiPeriodoDdl.Visible = True
- LiPeriodoLbl.Visible = True
-
- LiDivisorDdl.Visible = True
- LiDivisorLbl.Visible = True
-
- LblTri.Visible = False
- DVTri.Visible = False
-
- End If
-
- UpFiltros.Update()
- End Sub
-
-
- Protected Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs)
- ValidaEjercicios()
- End Sub
-
- Protected Sub DdlEjercicio2_SelectedIndexChanged(sender As Object, e As EventArgs)
- ValidaEjercicios()
- End Sub
-
- Private Sub ValidaEjercicios()
-
-
- Dim EInicio As Integer = DdlEjercicio.SelectedValue.ToEntero
-
-
- If EInicio > DdlEjercicio2.SelectedValue.ToEntero Then
-
- If DdlEjercicio2.Items.Count > 0 Then
- DdlEjercicio2.SelectedIndex = DdlEjercicio2.Items.Count - 1
- End If
-
- Dim Fejerciosio As Integer = DdlEjercicio2.SelectedValue.ToEntero
-
- If Not EInicio + 1 > Fejerciosio Then
- DdlEjercicio2.SelectedValueExist(EInicio + 1)
- End If
-
- End If
-
-
- UpFiltros.Update()
- End Sub
-
- Private Sub CargaEjercicios()
- 'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
- Dim ClsConta As New ClsContabilidad
- If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
- DdlEjercicio.DataSource = ClsConta.DtResultados
- DdlEjercicio2.DataSource = ClsConta.DtResultados
- Else
- DdlEjercicio.DataSource = Nothing
- DdlEjercicio2.DataSource = Nothing
- End If
- ClsConta.Dispose()
- DdlEjercicio.DataBind()
- DdlEjercicio2.DataBind()
-
- DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
- If DdlEjercicio.Items.Count = 0 Then
- DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString))
- End If
- DdlPeriodo.SelectedValue = Now.Month.ToString
- End Sub
-
- Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
- TotalActualMes = 0
- TotalAnteriorMes = 0
-
- 'Mes
- If TAB.ActiveTabIndex = 0 Then
- CargaDatosMes()
- End If
-
- 'MES HORIZONTAL
- If TAB.ActiveTabIndex = 1 Then
- CargaDatosMesH()
- End If
-
- 'AÑO HORIZONTAL
- If TAB.ActiveTabIndex = 2 Then
-
- If DdlEjercicio.SelectedValue.ToEntero > DdlEjercicio2.SelectedValue.ToEntero Then
- Alert("El ejercicio inicio no debe ser mayor al ejercicio fin.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
- CargaDatosAnualH()
- End If
-
- 'SUBPROYECTO
- If TAB.ActiveTabIndex = 3 Then
- CargaDatosSubProyectoH()
- End If
-
-
-
-
- End Sub
-
-
-#Region "MES"
-
-
-
-
-
- Private Sub CargaDatosMes()
-
-
- FechaIMes = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
- FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaIMes))).ToString("dd/MM/yyyy")
- 'Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1)
- Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
-
- 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetEstadosMensual(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
- DtDatosMes = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
- Else
- DtDatosMes = Nothing
- Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
- End If
- ObjConta.Dispose()
-
- If DtDatosMes IsNot Nothing Then
- CargaGridsMes()
- SumaTotales()
- End If
-
- End Sub
- Private Sub CargaGridsMes()
- DtIngresosMes = DtDatosMes.FiltraParametros("Tipo ='H' ")
- DtGastosMes = DtDatosMes.FiltraParametros("Tipo ='G' ")
- Dim Row As DataRow = DtIngresosMes.NewRow
-
-
- Dim TotalActual = 0.0, TotalAnterior = 0.0
- If DtIngresosMes.Rows.Count > 0 Then
-
- For Each dr As DataRow In DtIngresosMes.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = TotalActual.ToString
- Row.Item("PorcentajeActual") = "100.00"
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = "100.00"
- Row.Item("CtaMayor") = -1
- DtIngresosMes.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtIngresosMes.Rows.Add(Row)
- End If
-
- Dim T1 = TotalActual, T2 = TotalAnterior
-
- TotalActual = 0
- TotalAnterior = 0
-
- Row = DtGastosMes.NewRow
- If DtGastosMes.Rows.Count > 0 Then
-
- For Each dr As DataRow In DtGastosMes.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = TotalActual
- Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
- Row.Item("CtaMayor") = -1
- DtGastosMes.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtGastosMes.Rows.Add(Row)
- End If
-
-
- GvIngresosMes.DataSource = DtIngresosMes
- GvIngresosMes.DataBind()
-
- GvGastosMes.DataSource = DtGastosMes
- GvGastosMes.DataBind()
-
- UpDatos.Update()
-
- End Sub
-
-
-
- Private Sub SumaTotales()
- 'Llena Lb´s Totales
-
-
- If DdlDivisor.SelectedValue.ToEntero > 1 Then
- LbTotalActual.Text = TotalActualMes.ToString("###,###,##0")
- LbTotalAnterior.Text = TotalAnteriorMes.ToString("###,###,##0")
- Else
- LbTotalActual.Text = TotalActualMes.ToString("###,###,##0.00")
- LbTotalAnterior.Text = TotalAnteriorMes.ToString("###,###,##0.00")
- End If
-
-
-
- LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black)
-
- LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black)
-
-
- End Sub
-
-#Region "GV´S ROW DATA BOUND"
-
- Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.DataRow Then
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales3"
- e.Row.ControlStyle.Font.Bold = True
- End If
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
- e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
-
-
- If DdlDivisor.SelectedValue.ToEntero > 1 Then
- e.Row.FCHyperLink("HLActual").Text = e.Row.DataKey("ImporteActual").ToEntero.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAnterior").Text = e.Row.DataKey("ImporteAcumulado").ToEntero.ToString("###,###,##0").ToString
- Else
- e.Row.FCHyperLink("HLActual").Text = e.Row.DataKey("ImporteActual").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAnterior").Text = e.Row.DataKey("ImporteAcumulado").ToDecimal.ToString("###,###,##0.00").ToString
- End If
-
- End If
-
-
- If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
- End If
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
- Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales"
- e.Row.ControlStyle.Font.Bold = True
- End If
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
- e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
- End If
-
- If DdlDivisor.SelectedValue.ToEntero > 1 Then
- e.Row.FCHyperLink("HLActual").Text = e.Row.DataKey("ImporteActual").ToEntero.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAnterior").Text = e.Row.DataKey("ImporteAcumulado").ToEntero.ToString("###,###,##0").ToString
- Else
- e.Row.FCHyperLink("HLActual").Text = e.Row.DataKey("ImporteActual").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAnterior").Text = e.Row.DataKey("ImporteAcumulado").ToDecimal.ToString("###,###,##0.00").ToString
- End If
-
- If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
- End If
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
-#End Region
-
-
-
-
-#End Region
-
-
-
-#Region "M E S H O R I Z O N T A L"
-
- Private Sub CargaDatosMesH()
-
-
- FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
- Dim FechaFin As Date = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}".ToDate
- FechaFMes = $"{FechaFin.LastDayOfMonth.Day.ToString("00")}/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
-
- Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
-
- 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetEstadosMensualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
- DtDatosMesH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
- Else
- DtDatosMesH = Nothing
- Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
- End If
- ObjConta.Dispose()
-
- If DtDatosMesH IsNot Nothing Then
- CargaGridsMesH()
- Else
-
- End If
-
- End Sub
-
- Private Sub CargaGridsMesH()
-
- DtIngresosMesH = DtDatosMesH.FiltraParametros("Tipo ='H' ")
- DtGastosMesH = DtDatosMesH.FiltraParametros("Tipo ='G' ")
- DTTotalesMesH = DtDatosMesH.Clone()
-
- Dim Row As DataRow = DtIngresosMesH.NewRow
-
- Dim TotalActual = 0.0, TotalAnterior = 0.0
-
- If DtIngresosMesH.Rows.Count > 0 Then
-
- For Each dr As DataRow In DtIngresosMesH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- Row.Item("Enero") = DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4)")
- Row.Item("Febrero") = DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)")
- Row.Item("Marzo") = DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)")
- Row.Item("Abril") = DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4)")
- Row.Item("Mayo") = DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)")
- Row.Item("Junio") = DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4)")
- Row.Item("Julio") = DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4)")
- Row.Item("Agosto") = DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)")
- Row.Item("Septiembre") = DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")
- Row.Item("Octubre") = DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")
- Row.Item("Noviembre") = DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
- Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
-
- Row.Item("Tri1") = DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")
- Row.Item("Tri2") = DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")
- Row.Item("Tri3") = DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")
- Row.Item("Tri4") = DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")
-
- Row.Item("Cua1") = DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")
- Row.Item("Cua2") = DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")
- Row.Item("Cua3") = DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")
-
-
- Row.Item("Nombre") = "TOTAL INGRESOS"
- Row.Item("ImporteActual") = TotalActual.ToString
- Row.Item("PorcentajeActual") = "100.00"
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = "100.00"
- Row.Item("CtaMayor") = -1
-
- DtIngresosMesH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtIngresosMesH.Rows.Add(Row)
- End If
-
- Dim T1 = TotalActual, T2 = TotalAnterior
-
- TotalActual = 0
- TotalAnterior = 0
-
- Row = DtGastosMesH.NewRow
- If DtGastosMesH.Rows.Count > 0 Then
-
- For Each dr As DataRow In DtGastosMesH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
-
- Row.Item("Enero") = DtGastosMesH.SUM("Enero", "NOT CtaMayor in (3,4)")
- Row.Item("Febrero") = DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)")
- Row.Item("Marzo") = DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)")
- Row.Item("Abril") = DtGastosMesH.SUM("Abril", "NOT CtaMayor in (3,4)")
- Row.Item("Mayo") = DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)")
- Row.Item("Junio") = DtGastosMesH.SUM("Junio", "NOT CtaMayor in (3,4)")
- Row.Item("Julio") = DtGastosMesH.SUM("Julio", "NOT CtaMayor in (3,4)")
- Row.Item("Agosto") = DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)")
- Row.Item("Septiembre") = DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")
- Row.Item("Octubre") = DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")
- Row.Item("Noviembre") = DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
- Row.Item("Diciembre") = DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
-
- Row.Item("Tri1") = DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")
- Row.Item("Tri2") = DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")
- Row.Item("Tri3") = DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")
- Row.Item("Tri4") = DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")
-
- Row.Item("Cua1") = DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")
- Row.Item("Cua2") = DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")
- Row.Item("Cua3") = DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")
-
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = TotalActual
- Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
- Row.Item("CtaMayor") = -1
- DtGastosMesH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtGastosMesH.Rows.Add(Row)
- End If
-
- If DtIngresosMesH.Rows.Count > 0 Then
-
- Row = DTTotalesMesH.NewRow
-
- Row.Item("Enero") = DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Enero", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Febrero") = DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Marzo") = DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Abril") = DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Mayo") = DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Junio") = DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Julio") = DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Julio", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Agosto") = DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Septiembre") = DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Octubre") = DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Noviembre") = DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)")
-
- Row.Item("Tri1") = DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Tri2") = DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Tri3") = DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Tri4") = DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)")
-
- Row.Item("Cua1") = DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Cua2") = DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)")
- Row.Item("Cua3") = DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)")
-
- Row.Item("Nombre") = "Resultados del Ejercicio:"
- 'Row.Item("ImporteActual") = TotalActual.ToString
- 'Row.Item("PorcentajeActual") = "100.00"
- Row.Item("ImporteAcumulado") = DtIngresosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") ' TotalAnterior.ToString
- 'Row.Item("PorcentajeAcumulado") = "100.00"
- 'Row.Item("CtaMayor") = -1
-
- DTTotalesMesH.Rows.Add(Row)
-
- End If
-
- GvIngresosMesH.DataSource = DtIngresosMesH
- GvIngresosMesH.DataBind()
-
- GvGastosMesH.DataSource = DtGastosMesH
- GvGastosMesH.DataBind()
-
- GvTotalesMesH.DataSource = DTTotalesMesH
- GvTotalesMesH.DataBind()
-
-
- If DdlTri.SelectedValue.ToEntero = 0 Then 'ocultar trimestre cuatrimestre
-
- GvIngresosMesH.Columns(4).Visible = False
- GvIngresosMesH.Columns(9).Visible = False
- GvIngresosMesH.Columns(14).Visible = False
- GvIngresosMesH.Columns(18).Visible = False
-
- GvGastosMesH.Columns(4).Visible = False
- GvGastosMesH.Columns(9).Visible = False
- GvGastosMesH.Columns(14).Visible = False
- GvGastosMesH.Columns(18).Visible = False
-
- GvTotalesMesH.Columns(4).Visible = False
- GvTotalesMesH.Columns(9).Visible = False
- GvTotalesMesH.Columns(14).Visible = False
- GvTotalesMesH.Columns(18).Visible = False
-
- GvIngresosMesH.Columns(6).Visible = False
- GvIngresosMesH.Columns(12).Visible = False
- GvIngresosMesH.Columns(19).Visible = False
-
- GvGastosMesH.Columns(6).Visible = False
- GvGastosMesH.Columns(12).Visible = False
- GvGastosMesH.Columns(19).Visible = False
-
- GvTotalesMesH.Columns(6).Visible = False
- GvTotalesMesH.Columns(12).Visible = False
- GvTotalesMesH.Columns(19).Visible = False
-
-
- ElseIf DdlTri.SelectedValue.ToEntero = 1 Then 'Mostrar Trimestre
-
-
- GvIngresosMesH.Columns(4).Visible = True
- GvIngresosMesH.Columns(9).Visible = True
- GvIngresosMesH.Columns(14).Visible = True
- GvIngresosMesH.Columns(18).Visible = True
-
- GvGastosMesH.Columns(4).Visible = True
- GvGastosMesH.Columns(9).Visible = True
- GvGastosMesH.Columns(14).Visible = True
- GvGastosMesH.Columns(18).Visible = True
-
- GvTotalesMesH.Columns(4).Visible = True
- GvTotalesMesH.Columns(9).Visible = True
- GvTotalesMesH.Columns(14).Visible = True
- GvTotalesMesH.Columns(18).Visible = True
-
- GvIngresosMesH.Columns(6).Visible = False
- GvIngresosMesH.Columns(12).Visible = False
- GvIngresosMesH.Columns(19).Visible = False
-
- GvGastosMesH.Columns(6).Visible = False
- GvGastosMesH.Columns(12).Visible = False
- GvGastosMesH.Columns(19).Visible = False
-
- GvTotalesMesH.Columns(6).Visible = False
- GvTotalesMesH.Columns(12).Visible = False
- GvTotalesMesH.Columns(19).Visible = False
-
- ElseIf DdlTri.SelectedValue.ToEntero = 2 Then 'Mostrar Cuatrimestre
-
- GvIngresosMesH.Columns(4).Visible = False
- GvIngresosMesH.Columns(9).Visible = False
- GvIngresosMesH.Columns(14).Visible = False
- GvIngresosMesH.Columns(18).Visible = False
-
- GvGastosMesH.Columns(4).Visible = False
- GvGastosMesH.Columns(9).Visible = False
- GvGastosMesH.Columns(14).Visible = False
- GvGastosMesH.Columns(18).Visible = False
-
- GvTotalesMesH.Columns(4).Visible = False
- GvTotalesMesH.Columns(9).Visible = False
- GvTotalesMesH.Columns(14).Visible = False
- GvTotalesMesH.Columns(18).Visible = False
-
-
- GvIngresosMesH.Columns(6).Visible = True
- GvIngresosMesH.Columns(12).Visible = True
- GvIngresosMesH.Columns(19).Visible = True
-
- GvGastosMesH.Columns(6).Visible = True
- GvGastosMesH.Columns(12).Visible = True
- GvGastosMesH.Columns(19).Visible = True
-
- GvTotalesMesH.Columns(6).Visible = True
- GvTotalesMesH.Columns(12).Visible = True
- GvTotalesMesH.Columns(19).Visible = True
-
- End If
-
-
- UpDatosMesH.Update()
-
- End Sub
-
-
- Protected Sub GvIngresosMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- e.Row.ControlStyle.Font.Bold = True
- End If
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
-
- 'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensualHorizontal.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1"
-
- e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&TRCU={DdlTri.SelectedValue}"
-
- e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
- e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
- e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
-
- ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
-
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- End If
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Or e.Row.DBCampo("Nombre") = "TOTAL INGRESOS" Then
-
- If DdlDivisor.SelectedValue.ToEntero > 1 Then
-
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0")
- Else
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0.00")
- End If
-
- End If
-
- setgrafica(e)
-
-
-
-
- e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
- e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
- e.Row.FCHyperLink("HLMarzo").ForeColor = If(e.Row.DataKey("Marzo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMarzo").ForeColor)
- e.Row.FCHyperLink("HLAbril").ForeColor = If(e.Row.DataKey("Abril").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLMayo").ForeColor = If(e.Row.DataKey("Mayo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLJunio").ForeColor = If(e.Row.DataKey("Junio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMayo").ForeColor)
- e.Row.FCHyperLink("HLJulio").ForeColor = If(e.Row.DataKey("Julio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLJulio").ForeColor)
- e.Row.FCHyperLink("HLAgosto").ForeColor = If(e.Row.DataKey("Agosto").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAgosto").ForeColor)
- e.Row.FCHyperLink("HLSeptiembre").ForeColor = If(e.Row.DataKey("Septiembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLSeptiembre").ForeColor)
- e.Row.FCHyperLink("HLOctubre").ForeColor = If(e.Row.DataKey("Octubre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLOctubre").ForeColor)
- e.Row.FCHyperLink("HLNoviembre").ForeColor = If(e.Row.DataKey("Noviembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLNoviembre").ForeColor)
- e.Row.FCHyperLink("HLDiciembre").ForeColor = If(e.Row.DataKey("Diciembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLDiciembre").ForeColor)
-
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
-
- End If
-
- End Sub
-
- Protected Sub GvGastosMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales"
- e.Row.ControlStyle.Font.Bold = True
- End If
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
- Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
-
- 'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensualHorizontal.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1"
- e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&TRCU={DdlTri.SelectedValue}"
-
- e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
- e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
- e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
-
- 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- End If
-
-
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Or e.Row.DBCampo("Nombre") = "TOTAL GASTOS" Then
-
- If DdlDivisor.SelectedValue.ToEntero > 1 Then
-
- 'Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre,PorcentajeAcumulado
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0")
-
- Else
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0.00")
- End If
- End If
-
-
- setgrafica(e)
-
-
- e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
- e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
- e.Row.FCHyperLink("HLMarzo").ForeColor = If(e.Row.DataKey("Marzo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMarzo").ForeColor)
- e.Row.FCHyperLink("HLAbril").ForeColor = If(e.Row.DataKey("Abril").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLMayo").ForeColor = If(e.Row.DataKey("Mayo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLJunio").ForeColor = If(e.Row.DataKey("Junio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMayo").ForeColor)
- e.Row.FCHyperLink("HLJulio").ForeColor = If(e.Row.DataKey("Julio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLJulio").ForeColor)
- e.Row.FCHyperLink("HLAgosto").ForeColor = If(e.Row.DataKey("Agosto").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAgosto").ForeColor)
- e.Row.FCHyperLink("HLSeptiembre").ForeColor = If(e.Row.DataKey("Septiembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLSeptiembre").ForeColor)
- e.Row.FCHyperLink("HLOctubre").ForeColor = If(e.Row.DataKey("Octubre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLOctubre").ForeColor)
- e.Row.FCHyperLink("HLNoviembre").ForeColor = If(e.Row.DataKey("Noviembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLNoviembre").ForeColor)
- e.Row.FCHyperLink("HLDiciembre").ForeColor = If(e.Row.DataKey("Diciembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLDiciembre").ForeColor)
-
-
-
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
- Protected Sub GvTotalesMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.Header Then
- e.Row.Attributes.Add("style", "display:none")
- End If
-
- If e.Row.RowType = DataControlRowType.DataRow Then
-
- e.Row.Attributes.Add("style", "Font-weight: bold")
-
-
- If DdlDivisor.SelectedValue.ToEntero > 0 Then
-
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0")
-
- Else
- e.Row.FCHyperLink("HLEnero").Text = e.Row.DataKey("Enero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLFebrero").Text = e.Row.DataKey("Febrero").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMarzo").Text = e.Row.DataKey("Marzo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAbril").Text = e.Row.DataKey("Abril").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLMayo").Text = e.Row.DataKey("Mayo").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJunio").Text = e.Row.DataKey("Junio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLJulio").Text = e.Row.DataKey("Julio").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLAgosto").Text = e.Row.DataKey("Agosto").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLSeptiembre").Text = e.Row.DataKey("Septiembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLOctubre").Text = e.Row.DataKey("Octubre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLNoviembre").Text = e.Row.DataKey("Noviembre").ToDecimal.ToString("###,###,##0.00")
- e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0.00")
- End If
-
- setgrafica(e)
-
- e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
- e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
- e.Row.FCHyperLink("HLMarzo").ForeColor = If(e.Row.DataKey("Marzo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMarzo").ForeColor)
- e.Row.FCHyperLink("HLAbril").ForeColor = If(e.Row.DataKey("Abril").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLMayo").ForeColor = If(e.Row.DataKey("Mayo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAbril").ForeColor)
- e.Row.FCHyperLink("HLJunio").ForeColor = If(e.Row.DataKey("Junio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMayo").ForeColor)
- e.Row.FCHyperLink("HLJulio").ForeColor = If(e.Row.DataKey("Julio").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLJulio").ForeColor)
- e.Row.FCHyperLink("HLAgosto").ForeColor = If(e.Row.DataKey("Agosto").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAgosto").ForeColor)
- e.Row.FCHyperLink("HLSeptiembre").ForeColor = If(e.Row.DataKey("Septiembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLSeptiembre").ForeColor)
- e.Row.FCHyperLink("HLOctubre").ForeColor = If(e.Row.DataKey("Octubre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLOctubre").ForeColor)
- e.Row.FCHyperLink("HLNoviembre").ForeColor = If(e.Row.DataKey("Noviembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLNoviembre").ForeColor)
- e.Row.FCHyperLink("HLDiciembre").ForeColor = If(e.Row.DataKey("Diciembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLDiciembre").ForeColor)
-
-
- 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.DataKey("Enero").ToDecimal(), .Color = "#FF0F00"})
- lista.Add(New With {.Texto = "Febrero", .Valor = e.Row.DataKey("Febrero").ToDecimal(), .Color = "#FF6600"})
- lista.Add(New With {.Texto = "Marzo", .Valor = e.Row.DataKey("Marzo").ToDecimal(), .Color = "#F8FF01"})
- lista.Add(New With {.Texto = "Abril", .Valor = e.Row.DataKey("Abril").ToDecimal(), .Color = "#04D215"})
- lista.Add(New With {.Texto = "Mayo", .Valor = e.Row.DataKey("Mayo").ToDecimal(), .Color = "#2A0CD0"})
- lista.Add(New With {.Texto = "Junio", .Valor = e.Row.DataKey("Junio").ToDecimal(), .Color = "#8A0CCF"})
- lista.Add(New With {.Texto = "Julio", .Valor = e.Row.DataKey("Julio").ToDecimal(), .Color = "#CD0D74"})
- lista.Add(New With {.Texto = "Agosto", .Valor = e.Row.DataKey("Agosto").ToDecimal(), .Color = "#754DEB"})
- lista.Add(New With {.Texto = "Septiembre", .Valor = e.Row.DataKey("Septiembre").ToDecimal(), .Color = "#DDDDDD"})
- lista.Add(New With {.Texto = "Octubre", .Valor = e.Row.DataKey("Octubre").ToDecimal(), .Color = "#999999"})
- lista.Add(New With {.Texto = "Noviembre", .Valor = e.Row.DataKey("Noviembre").ToDecimal(), .Color = "#000000"})
- lista.Add(New With {.Texto = "Diciembre", .Valor = e.Row.DataKey("Diciembre").ToDecimal(), .Color = "#FF0F00"})
- e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
- End Sub
-#End Region
-
-
-
-#Region "Anual H O R I Z O N T A L"
-
- Private Sub CargaDatosAnualH()
-
-
- FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
- FechaFMes = $"31/12/{DdlEjercicio2.SelectedValue}"
-
- Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
-
- 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero) Then
- DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
- Else
- DtDatosAnualH = Nothing
- Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
- End If
- ObjConta.Dispose()
-
- If DtDatosAnualH IsNot Nothing Then
- CargaGridsAnualH()
-
- End If
-
- End Sub
-
- Private Sub CargaGridsAnualH()
-
- DtIngresosAnualH = DtDatosAnualH.FiltraParametros("Tipo ='H' ")
- DtGastosAnualH = DtDatosAnualH.FiltraParametros("Tipo ='G' ")
- DTTotalesAnualH = DtDatosAnualH.Clone()
-
- Dim Row As DataRow = DtIngresosAnualH.NewRow
-
- Dim TotalActual = 0.0, TotalAnterior = 0.0
-
-
- Dim IndexData As Integer = 0
- Dim IndexGv As Integer = 1
- Dim IndexMax As Integer = 1
-
-
- Dim IDX_LIMPIAR As Integer = 1
-
- For IDX_LIMPIAR = 1 To 25
-
- GvIngresosAnualH.Columns(IDX_LIMPIAR).Visible = False
- GvGastosAnualH.Columns(IDX_LIMPIAR).Visible = False
- GvTotalesAnualH.Columns(IDX_LIMPIAR).Visible = False
- Next
- listaCamposanios.Clear()
- listaCamposaniosGastos.Clear()
- listaCamposaniosTotal.Clear()
-
- If DtIngresosAnualH.Rows.Count > 0 Then
-
-
-
-
- For Each dCoumn As DataColumn In DtIngresosAnualH.Columns
-
- If IndexData >= 13 Then
-
- If dCoumn.ColumnName.ToEntero > 0 And dCoumn.ColumnName.ToEntero <= DdlEjercicio2.SelectedValue.ToEntero Then
-
- CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
-
-
- listaCamposanios.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
-
- listaCamposaniosTotal.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
- 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
- GvIngresosAnualH.Columns(IndexGv).Visible = True
-
-
- CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
- 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
- GvTotalesAnualH.Columns(IndexGv).Visible = True
-
- IndexMax = IndexData
- Else
- GvIngresosAnualH.Columns(IndexGv).Visible = False
- GvTotalesAnualH.Columns(IndexGv).Visible = False
- End If
-
-
-
- IndexGv = IndexGv + 1
- End If
-
- IndexData = IndexData + 1
-
- Next
-
-
- For Each dr As DataRow In DtIngresosAnualH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
-
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
-
- Next
-
- IndexData = 13
- For IndexData = 13 To IndexMax
- Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
- Next
-
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = DtIngresosAnualH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString
- Row.Item("PorcentajeActual") = "100.00"
- Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = "100.00"
- Row.Item("CtaMayor") = -1
- Row.Item("CountDinamico") = DtGastosAnualH.MAX("CountDinamico")
- CountDinamicoAnual = DtGastosAnualH.MAX("CountDinamico").ToEntero
- DtIngresosAnualH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtIngresosAnualH.Rows.Add(Row)
- End If
-
- Dim T1 = TotalActual, T2 = TotalAnterior
-
- TotalActual = 0
- TotalAnterior = 0
-
- Row = DtGastosAnualH.NewRow
-
- If DtGastosAnualH.Rows.Count > 0 Then
-
-
- IndexData = 0
- IndexGv = 1
- IndexMax = 0
-
- For Each dCoumn As DataColumn In DtGastosAnualH.Columns
-
- If IndexData >= 13 Then
-
- If dCoumn.ColumnName.ToEntero > 0 And dCoumn.ColumnName.ToEntero <= DdlEjercicio2.SelectedValue.ToEntero Then
- 'HyperLinkField
-
- CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
- listaCamposaniosGastos.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
-
- 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFields = {"CveCuenta", "FechaInicial", "FechaFActual", "CveSubProyecto"}
- 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFormatString = "/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}"
-
- 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
-
- GvGastosAnualH.Columns(IndexGv).Visible = True
- IndexMax = IndexData
- Else
- GvGastosAnualH.Columns(IndexGv).Visible = False
- End If
-
-
-
- IndexGv = IndexGv + 1
- End If
-
- IndexData = IndexData + 1
-
- Next
-
-
- For Each dr As DataRow In DtGastosAnualH.FiltraParametros("Not CtaMayor In (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- IndexData = 13
- For IndexData = 13 To IndexMax
-
- Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
-
- Next
-
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = TotalActual
- Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
- Row.Item("CtaMayor") = -1
- Row.Item("CountDinamico") = DtGastosAnualH.MAX("CountDinamico")
- DtGastosAnualH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtGastosAnualH.Rows.Add(Row)
- End If
-
- If DtIngresosAnualH.Rows.Count > 0 Then
-
- Row = DTTotalesAnualH.NewRow
-
-
- IndexData = 13
- For IndexData = 13 To IndexMax
- Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
- Next
-
- Row.Item("Nombre") = "Resultados del Ejercicio"
- Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)")
-
-
- DTTotalesAnualH.Rows.Add(Row)
-
- End If
-
- GvIngresosAnualH.DataSource = DtIngresosAnualH
- GvIngresosAnualH.DataBind()
-
- GvGastosAnualH.DataSource = DtGastosAnualH
- GvGastosAnualH.DataBind()
-
- GvTotalesAnualH.DataSource = DTTotalesAnualH
- GvTotalesAnualH.DataBind()
-
- UpDatosAnualH.Update()
-
- End Sub
-
-
-
- Protected Sub GvIngresosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.DataRow Then
- setgraficaCCAnual(e, listaCamposanios)
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales3"
- e.Row.ControlStyle.Font.Bold = True
- End If
-
-
- Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
- Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
-
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
- e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- For IndiceInicio = 1 To IndiceMax
- Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) } "
- 'e.Row.Cells(IndiceInicio).ForeColor = If(Importe < 0, Drawing.Color.Red, e.Row.Cells(IndiceInicio).ForeColor)
- Next IndiceInicio
-
- 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
-
-
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- For IndiceInicio = 1 To IndiceMax
-
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) } "
-
- Next IndiceInicio
-
-
- End If
-
-
-
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
- Protected Sub GvGastosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.DataRow Then
- setgraficaCCAnual(e, listaCamposaniosGastos)
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales"
- e.Row.ControlStyle.Font.Bold = True
- End If
-
- Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
- Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
- 'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1&EjercicioFinal={DdlEjercicio2.SelectedValue}"
- e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
- For IndiceInicio = 1 To IndiceMax
- Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"{If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00"))} "
- 'e.Row.Cells(IndiceInicio).ForeColor = If(Importe < 0, Drawing.Color.Red, e.Row.Cells(IndiceInicio).ForeColor)
- Next IndiceInicio
-
- 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
-
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- For IndiceInicio = 1 To IndiceMax
-
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) } "
-
- Next IndiceInicio
-
- End If
-
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
- Protected Sub GvTotalesAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.Header Then
- e.Row.Attributes.Add("style", "display:none")
- End If
-
- If e.Row.RowType = DataControlRowType.DataRow Then
- setgraficaCCAnual(e, listaCamposaniosTotal)
- e.Row.Attributes.Add("style", "Font-weight: bold")
- End If
-
- End Sub
-
- Public Sub setgraficaCCAnual(e As GridViewRowEventArgs, listaCampos As List(Of String()))
- Dim lista As New List(Of Object)
- Dim colorindex As Integer = 0
- For Each campo As String() In listaCampos
- 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
-#End Region
-
-
-#Region "S U B P R O Y E C T O H O R I Z O N T A L"
-
- Private Sub CargaDatosSubProyectoH()
-
-
- FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
- FechaFMes = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
- FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaFMes))).ToString("dd/MM/yyyy")
-
- Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
-
-
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
- DTSubProyectosCabecerasH = ObjConta.DSResultados.Tables(0)
- DtDatosSubProyectoH = ObjConta.DSResultados.Tables(1).FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
- Else
- DtDatosSubProyectoH = Nothing
- Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
- End If
- ObjConta.Dispose()
-
- If DtDatosSubProyectoH IsNot Nothing And DTSubProyectosCabecerasH IsNot Nothing Then
- CargaGridsSubProyectoH()
- End If
-
- End Sub
-
- Private Sub CargaGridsSubProyectoH()
-
- DtIngresosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='H' ")
- DtGastosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='G' ")
- DTTotalesSubProyectoH = DtDatosSubProyectoH.Clone()
-
- Dim Row As DataRow = DtIngresosSubProyectoH.NewRow
-
- Dim TotalActual = 0.0, TotalAnterior = 0.0
-
-
- Dim IndexData As Integer = 0
- Dim IndexGv As Integer = 1
- Dim IndexMax As Integer = 1
- Dim IndexSubProyecto = 0
- Dim IndexSubProyectoMAx As Integer = DTSubProyectosCabecerasH.Rows.Count - 1
- Dim IndexTotatles As Integer = 13 + IndexSubProyectoMAx
-
- '34
- Dim IDX_LIMPIAR As Integer = 1
-
- For IDX_LIMPIAR = 1 To 35
- CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
- CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
- GvIngresosSubProyectoH.Columns(IDX_LIMPIAR).Visible = False
- Next
- listaCampos.Clear()
-
-
- If DtIngresosSubProyectoH.Rows.Count > 0 Then
-
- For Each dCoumn As DataColumn In DtIngresosSubProyectoH.Columns
-
- If IndexData >= 13 Then
-
- If IndexSubProyecto <= IndexSubProyectoMAx Then
-
- CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- GvIngresosSubProyectoH.Columns(IndexGv).Visible = True
-
- CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- GvTotalesSubProyectoH.Columns(IndexGv).Visible = True
-
- If IndexSubProyecto <= IndexSubProyectoMAx Then
- CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
- CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
- CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
- End If
- listaCampos.Add(New String() {dCoumn.ColumnName.ToString(), DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString()})
- Else
- GvIngresosSubProyectoH.Columns(IndexGv).Visible = False
- GvTotalesSubProyectoH.Columns(IndexGv).Visible = False
- End If
-
- IndexGv = IndexGv + 1
- IndexSubProyecto = IndexSubProyecto + 1
- IndexMax = IndexMax + 1
-
- End If
- IndexData = IndexData + 1
- Next
-
-
- For Each dr As DataRow In DtIngresosSubProyectoH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- IndexData = 13
- For IndexData = 13 To IndexTotatles
- Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
- Next
-
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString
- Row.Item("PorcentajeActual") = "100.00"
- Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = "100.00"
- Row.Item("CtaMayor") = -1
- Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico")
- CountDinamicoSubProyecto = DtIngresosSubProyectoH.MAX("CountDinamico").ToEntero
- DtIngresosSubProyectoH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtIngresosSubProyectoH.Rows.Add(Row)
- End If
-
- Dim T1 = TotalActual, T2 = TotalAnterior
-
- TotalActual = 0
- TotalAnterior = 0
-
- Row = DtGastosSubProyectoH.NewRow
-
- If DtGastosSubProyectoH.Rows.Count > 0 Then
-
-
- IndexData = 0
- IndexGv = 1
- IndexMax = 0
- IndexSubProyecto = 0
-
- For Each dCoumn As DataColumn In DtIngresosSubProyectoH.Columns
- If IndexData >= 13 Then
- If IndexSubProyecto <= IndexSubProyectoMAx Then
- CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- GvGastosSubProyectoH.Columns(IndexGv).Visible = True
- CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
- GvTotalesSubProyectoH.Columns(IndexGv).Visible = True
- Else
- GvIngresosSubProyectoH.Columns(IndexGv).Visible = False
- GvTotalesSubProyectoH.Columns(IndexGv).Visible = False
- End If
-
- IndexGv = IndexGv + 1
- IndexSubProyecto = IndexSubProyecto + 1
- End If
- IndexData = IndexData + 1
- Next
-
-
-
- For Each dr As DataRow In DtGastosSubProyectoH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
- TotalActual += dr("ImporteActual").ToString.ToDouble
- TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
- Next
-
- IndexData = 13
- For IndexData = 13 To IndexTotatles
- Row.Item(IndexData) = DtGastosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
- Next
-
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = TotalActual
- Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
- Row.Item("ImporteAcumulado") = TotalAnterior.ToString
- Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
- Row.Item("CtaMayor") = -1
- Row.Item("CountDinamico") = DtGastosSubProyectoH.MAX("CountDinamico")
-
- DtGastosSubProyectoH.Rows.Add(Row)
- Else
- Row.Item("Nombre") = "TOTAL GASTOS"
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtGastosSubProyectoH.Rows.Add(Row)
- End If
-
- If DtIngresosSubProyectoH.Rows.Count > 0 Then
-
- Row = DTTotalesSubProyectoH.NewRow
-
- IndexData = 13
- For IndexData = 13 To IndexTotatles
- Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") - DtGastosSubProyectoH.SUM($"[{DtGastosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)")
- Next
-
- Row.Item("Nombre") = "Resultado del ejercicio"
- Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosSubProyectoH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
- Row.Item("CtaMayor") = -2
- Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico")
-
- DTTotalesSubProyectoH.Rows.Add(Row)
-
- End If
-
- DtIngresosSubProyectoH.Merge(DtGastosSubProyectoH)
- DtIngresosSubProyectoH.Merge(DTTotalesSubProyectoH)
-
-
- GvIngresosSubProyectoH.DataSource = DtIngresosSubProyectoH
- GvIngresosSubProyectoH.DataBind()
-
-
-
- UpDatosSubProyectoH.Update()
-
- End Sub
-
- 'Private Sub SumaTotalesSubProyectoH()
- ' ''Llena Lb´s Totales
- ' ''*********************************************************************************
- ' 'LbTotalActual.Text = TotalActualMes.ToString.FormatoNumero
- ' 'LbTotalAnterior.Text = TotalAnteriorMes.ToString.FormatoNumero
-
- ' 'LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black)
- ' 'LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black)
-
-
- 'End Sub
-
- Protected Sub GvIngresosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
- TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
- 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales3"
- e.Row.ControlStyle.Font.Bold = True
-
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
-
- e.Row.ControlStyle.Font.Bold = True
- e.Row.ControlStyle.Font.Size = 13
- End If
- Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
- setgraficaCC(e)
- 'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
-
- e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- Dim FEchaMesFinal As Date = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1).LastDayOfMonth
-
- For IndiceInicio = 1 To IndiceMax
-
- Dim CveSubProyectoIntermo As String = CType(GvGastosSubProyectoH.Columns(IndiceInicio), BoundField).DataField
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
-
-
- If CveSubProyectoIntermo.ToEntero > 0 Then
- e.Row.Cells(IndiceInicio).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) } "
- End If
-
-
-
- Next IndiceInicio
-
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
-
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- For IndiceInicio = 1 To IndiceMax
-
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"
{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }
"
- Next IndiceInicio
-
-
-
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
-
- Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
- Dim IndiceInicio As Integer = 1
- Dim IndiceMax As Integer = 1 + CountDinamico
-
- For IndiceInicio = 1 To IndiceMax
-
- Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
- e.Row.Cells(IndiceInicio).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }
"
-
- Next IndiceInicio
-
-
- End If
- e.Row.FCHyperLink("HLAnterior").Text = If(DdlDivisor.SelectedValue.ToEntero > 1, e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0"), e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0.00"))
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
-
- End If
-
- End Sub
-
- Protected Sub GvGastosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.DataRow Then
- setgraficaCC(e)
- If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
- TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
- TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
- e.Row.ControlStyle.Font.Bold = True
- ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
- 'e.Row.CssClass = "SubTotales"
- e.Row.ControlStyle.Font.Bold = True
- End If
- If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
- e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
- End If
- End If
- End Sub
-
- Protected Sub GvTotalesSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
- If e.Row.RowType = DataControlRowType.Header Then
- ' e.Row.Attributes.Add("style", "display:none")
- End If
- If e.Row.RowType = DataControlRowType.DataRow Then
- setgraficaCC(e)
- e.Row.Attributes.Add("style", "Font-weight: bold")
- 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 listaCampos
- 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
-#End Region
-
-
-
-
-
-#Region "DESCARGA EXCEL"
-
- Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
- Imprimir("Excel")
- End Sub
-
- Private Sub Imprimir(Optional reporte As String = "PDF")
-
-
- If TAB.ActiveTabIndex = 0 AndAlso GvIngresosMes.Rows.Count > 0 Then
- ExportToExcelG(GvIngresosMes, GvGastosMes, TMesT1, "Reporte_Mensual", UsuarioActual, "Mensual")
- ElseIf TAB.ActiveTabIndex = 1 AndAlso GvIngresosMesH.Rows.Count > 0 Then
- ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH)
- ElseIf TAB.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then
- ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH)
-
- ElseIf TAB.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then
-
- ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True)
-
- End If
-
-
- End Sub
-
- 'Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
- Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProtyecto As Boolean = False)
-
- Dim sw1 As New StringWriter()
- Dim htw1 As New HtmlTextWriter(sw1)
- Gv1.RenderControl(htw1)
-
- Dim sw2 As New StringWriter()
- Dim htw2 As New HtmlTextWriter(sw2)
- Gv2.RenderControl(htw2)
-
-
- TablaResultados.Width = Gv2.Width.ToString
-
- Dim sw3 As New StringWriter()
- Dim htw3 As New HtmlTextWriter(sw3)
- TablaResultados.RenderControl(htw3)
-
- Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
-
- Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
- Dim htmlStream2 = New MemoryStream(options.Encoding.GetBytes(sw2.ToString()))
- Dim htmlStream3 = New MemoryStream(options.Encoding.GetBytes(sw3.ToString()))
-
- htmlStream1.Position = 0
- Dim sr1 As New StreamReader(htmlStream1)
-
- htmlStream2.Position = 0
- Dim sr2 As New StreamReader(htmlStream2)
-
- htmlStream3.Position = 0
- Dim sr3 As New StreamReader(htmlStream3)
-
-
- Dim myStr1 = sr1.ReadToEnd()
- Dim myStr2 = sr2.ReadToEnd()
- Dim myStr3 = sr3.ReadToEnd()
-
- sr1.Dispose()
- sr2.Dispose()
- sr3.Dispose()
-
- htmlStream1.Dispose()
- htmlStream2.Dispose()
- htmlStream3.Dispose()
-
- sw1.Dispose()
- sw2.Dispose()
- sw3.Dispose()
-
- If Gv3 IsNot Nothing Then
-
- Gv3.ShowHeader = False
-
- Dim sw4 As New StringWriter()
- Dim htw4 As New HtmlTextWriter(sw4)
- Gv3.RenderControl(htw4)
- Dim htmlStream4 = New MemoryStream(options.Encoding.GetBytes(sw4.ToString()))
- htmlStream4.Position = 0
- Dim sr4 As New StreamReader(htmlStream4)
- myStr3 = sr4.ReadToEnd()
-
- sr4.Dispose()
- htmlStream2.Dispose()
- sw4.Dispose()
-
- End If
-
-
- Dim HtmlCompleto As String = myStr1 & " " & myStr2 & " " & myStr3
-
-
- HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
-
-
- Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
-
- GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
-
- Dim excel As GemBox.Spreadsheet.ExcelFile
-
- excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
-
- If Usuario IsNot Nothing Then
-
- Dim TotalRowHeader As Integer = 8
- Dim TotalRowFooter As Integer = 2
-
-
- Dim worksheet = excel.Worksheets(0)
- worksheet.Rows.InsertEmpty(0, TotalRowHeader)
- Dim celdasConTexto = worksheet.GetUsedCellRange(True)
- celdasConTexto.Style.Font.Name = "Calibri Light"
-
- Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
- RangoNombreEmpresa.Merged = True
- RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
- RangoNombreEmpresa.Style.Font.Size = 18 * 20
- RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
- RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
- RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
-
-
- Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
- RangoTitulo.Merged = True
- RangoTitulo.Value = Titulo
- RangoTitulo.Style.Font.Size = 20 * 20
- RangoTitulo.Style.Font.Name = "Calibri Light"
- RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
- RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
-
- Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
- RangoFechas.Merged = True
- RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
- RangoFechas.Style.Font.Size = 15 * 20
- RangoFechas.Style.Font.Name = "Calibri Light"
- RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
- RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
-
-
- If EsPorSubProtyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
- Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
- RangoSubProyecto.Merged = True
- RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text
- RangoSubProyecto.Style.Font.Size = 20 * 20
- RangoSubProyecto.Style.Font.Name = "Calibri Light"
- RangoSubProyecto.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
- RangoSubProyecto.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- End If
-
- For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
-
- worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
- worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
- worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
-
- worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
- worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
-
-
-
- If Not EsPorSubProtyecto Then
- worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
- worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
- Else
- worksheet.Rows(18).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
- worksheet.Rows(18).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
- End If
-
-
-
- If i > 0 Then
- Try
- worksheet.Columns(i).AutoFit(1)
- Catch ex As Exception
- End Try
- End If
- Next
-
- Dim IndexEndTable As Integer = Gv1.Rows.Count + Gv2.Rows.Count + 4 + TotalRowHeader + TotalRowFooter
-
- worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
- worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
-
- worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
- worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
-
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
-
- If Imagen.Exists Then
- Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
- Using sr As New StreamReader(Ruta)
- Dim ms As New MemoryStream()
- sr.BaseStream.CopyTo(ms)
- worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
- End Using
- End If
-
-
-
-
-
-
- For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
-
- If I > 0 Then
-
- If DdlDivisor.SelectedValue.ToEntero = 1 Then
- worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00"
- Else
- worksheet.Columns(I + 1).Style.NumberFormat = "#,##"
- End If
-
- Try
- worksheet.Columns(I).AutoFit(1)
- Catch ex As Exception
- End Try
-
- End If
- Next
-
- End If
-
- excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
-
-
- End Sub
-
- Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
- End Sub
-
-#End Region
-
-
-
-
-
-End Class
-
diff --git a/Contabilidad2/Reportes/_________________RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/_________________RepSituacionFinanciera.rdlc
deleted file mode 100644
index 69f81caa8..000000000
--- a/Contabilidad2/Reportes/_________________RepSituacionFinanciera.rdlc
+++ /dev/null
@@ -1,3060 +0,0 @@
-
-
- 0
-
-
-
- System.Data.DataSet
- /* Local Connection */
-
- 3560db3f-20af-4776-9f09-85925745c52f
-
-
-
-
-
- DataSet1
- /* Local Query */
-
-
-
- Nombre
- System.String
-
-
- ImporteActual
- System.Int16
-
-
- ImporteAnterior
- System.Int16
-
-
- CtaMayor
- System.Int16
-
-
- Orden
- System.String
-
-
- Tipo
- System.String
-
-
- Sup
- System.String
-
-
- Level
- System.Int16
-
-
- TipoCuenta
- System.Int16
-
-
-
- DataSet1
- c:\users\caudillo\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\DataSet1.xsd
- ActivoCirculante
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5.36361cm
-
-
- 2.86585cm
-
-
- 2.19558cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- ACTIVO CIRCULANTE
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
-
-
-
-
- TOTAL ACTIVO CIRCULANTE
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- ImporteAnterior1
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!Tipo.Value
- In
-
- =CStr("A,B,C").Split(",")
-
-
-
- =Fields!TipoCuenta.Value
- Equal
-
- 1
-
-
-
- 2.6512cm
- 0.31432cm
- 1.65cm
- 10.42504cm
-
-
- Verdana
- 8pt
-
-
-
-
-
-
- 5.36361cm
-
-
- 2.86585cm
-
-
- 2.19558cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- ACTIVO NO CIRCULANTE
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- TOTAL ACTIVO NO CIRCULANTE
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum( Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- Textbox12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!Tipo.Value
- In
-
- =CStr("A,B,C").Split(",")
-
-
-
- =Fields!TipoCuenta.Value
- Equal
-
- 2
-
-
-
- 4.74417cm
- 0.31432cm
- 1.65cm
- 10.42504cm
- 1
-
-
- Verdana
- 8pt
-
-
-
-
-
-
- 5.21467cm
-
-
- 2.56871cm
-
-
- 1.91058cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- PASIVO CIRCULANTE
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- TOTAL PASIVO CIRCULANTE
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- Textbox12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!Tipo.Value
- Equal
-
- D
-
-
-
- =Fields!TipoCuenta.Value
- Equal
-
- 3
-
-
-
- 2.6512cm
- 10.77464cm
- 1.65cm
- 9.69395cm
- 2
-
-
- Verdana
- 8pt
-
-
-
-
-
-
- 5.21467cm
-
-
- 2.56871cm
-
-
- 1.91058cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- PASIVO NO CIRCULANTE
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- TOTAL PASIVO NO CIRCULANTE
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- Textbox12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!Tipo.Value
- Equal
-
- D
-
-
-
- =Fields!TipoCuenta.Value
- Equal
-
- 4
-
-
-
- 4.74417cm
- 10.77464cm
- 1.65cm
- 9.69395cm
- 3
-
-
- Verdana
- 8pt
-
-
-
- true
- true
-
-
-
-
- ACTIVO
-
-
-
-
-
-
- Textbox28
- 1.91009cm
- 0.31432cm
- 0.6cm
- 10.46032cm
- 4
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- PASIVO
-
-
-
-
-
-
- Textbox28
- 1.91009cm
- 10.77464cm
- 0.6cm
- 9.69395cm
- 5
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
- 5.21467cm
-
-
- 2.56871cm
-
-
- 1.91058cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- CAPITAL CONTABLE
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- TOTAL CAPITAL
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- Textbox12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!Tipo.Value
- Equal
-
- F
-
-
-
- =Fields!TipoCuenta.Value
- In
-
- 5
- 6
- 7
- 8
-
-
-
- 8.30193cm
- 10.77464cm
- 1.65cm
- 9.69395cm
- 6
-
-
- Verdana
- 8pt
-
-
-
- true
- true
-
-
-
-
- CAPITAL
-
-
-
-
-
-
- Textbox28
- 7.52554cm
- 10.77464cm
- 0.6cm
- 9.69395cm
- 7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Total CAPITAL
-
-
-
-
-
-
- Textbox45
- 10.22837cm
- 10.77464cm
- 0.6cm
- 5.21467cm
- 8
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalPatrimonioHAnterior.Value
-
-
-
-
-
-
- Textbox45
- 10.22837cm
- 18.55801cm
- 0.6cm
- 1.91058cm
- 9
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalPatrimonioHActual.Value
-
-
-
-
-
-
- Textbox45
- 10.22837cm
- 15.98931cm
- 0.6cm
- 2.56871cm
- 10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Total Pasivo y Patrimonio
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 10.77464cm
- 0.6cm
- 5.21467cm
- 11
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalpasivoYHaciendaAnterior.Value
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 18.55801cm
- 0.6cm
- 1.91058cm
- 12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalpasivoYHaciendaActual.Value
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 15.98931cm
- 0.6cm
- 2.56871cm
- 13
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Total del Pasivo:
-
-
-
-
-
-
- Textbox45
- 6.57056cm
- 10.77464cm
- 0.6cm
- 5.21467cm
- 14
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalPasivoAnterior.Value
-
-
-
-
-
-
- Textbox45
- 6.53528cm
- 18.55801cm
- 0.6cm
- 1.91058cm
- 15
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalPasivoActual.Value
-
-
-
-
-
-
- Textbox45
- 6.57056cm
- 15.98931cm
- 0.6cm
- 2.56871cm
- 16
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2))
-
-
-
-
-
-
- Textbox73
- 11.81312cm
- 10.77464cm
- 0.6cm
- 9.69395cm
- 17
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- External
- = Parameters!pImg.Value
- FitProportional
- 0.03141cm
- 0.31432cm
- 1.5cm
- 5.36361cm
- 18
-
-
-
-
-
- true
- true
-
-
-
-
- =Parameters!pEmp.Value
-
-
-
-
-
-
- Textbox1
- 0.03141cm
- 5.67793cm
- 0.81167cm
- 10.31137cm
- 19
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Estado de Situación Financiera al
-
-
-
- =Parameters!pFechaFin.Value
-
-
-
-
-
-
- Textbox5
- 0.89924cm
- 5.67793cm
- 0.6cm
- 10.31137cm
- 20
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy")
-
-
-
-
-
-
- Textbox8
- 0.07056cm
- 15.98931cm
- 0.81167cm
- 4.47928cm
- 21
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
- 5.36361cm
-
-
- 2.86585cm
-
-
- 2.19558cm
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- ACTIVO DIFERIDO
-
-
-
-
-
-
- Textbox7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
- 3
-
-
-
-
-
-
-
- 0.45cm
-
-
-
-
- true
-
-
-
-
- =Fields!Nombre.Value
-
-
-
-
-
-
- Nombre
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteActual.Value
-
-
-
-
-
-
- ImporteActual
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!ImporteAnterior.Value
-
-
-
-
-
-
- ImporteAnterior
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.6cm
-
-
-
-
- true
- true
-
-
-
-
- TOTAL ACTIVO DIFERIDO
-
-
-
-
-
-
- Textbox10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteActual.Value)
-
-
-
-
-
-
- ImporteActual1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Sum(Fields!ImporteAnterior.Value)
-
-
-
-
-
-
- Textbox12
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- After
- true
-
-
-
-
-
- Before
-
-
-
- DataSet1
-
-
- =Fields!TipoCuenta.Value
- Equal
-
- 9
-
-
-
- 6.92554cm
- 0.31432cm
- 1.65cm
- 10.42504cm
- 22
-
-
- Verdana
- 8pt
-
-
-
- true
- true
-
-
-
-
- Total del Activo
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 0.31432cm
- 0.6cm
- 5.36361cm
- 23
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalActivoAnterior.Value
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 8.54379cm
- 0.6cm
- 2.19558cm
- 24
-
- true
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Variables!TotalActivoActual.Value
-
-
-
-
-
-
- Textbox45
- 11.12267cm
- 5.67793cm
- 0.6cm
- 2.86585cm
- 25
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- 4.88706in
-
-
- 8.0585in
-
-
- 0.74083cm
- true
- true
-
-
- true
- true
-
-
-
-
- Estado de Situación Financiera al
-
-
-
- =Parameters!pFechaFin.Value
-
-
-
-
-
-
- Textbox5
- 3.454cm
- 0.6cm
- 12.91455cm
-
- = (Globals.PageNumber=1)
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy")
-
-
-
-
-
-
- Textbox8
- 0.02088cm
- 16.62517cm
- 0.57912cm
- 3.49249cm
- 1
-
- = (Globals.PageNumber=1)
-
-
-
- 2pt
- 2pt
-
-
-
-
-
-
-
-
- 2.46062cm
- true
- true
-
-
- true
- true
-
-
-
-
- ="Página " & Globals.PageNumber & " de " & Globals.TotalPages
-
-
-
-
-
-
- Textbox3
- 1.86062cm
- 16.37931cm
- 0.6cm
- 3.95896cm
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!pFirma2.Value
-
-
-
-
-
-
- Textbox2
- 0.10583cm
- 1.71666cm
- 0.99688cm
- 8.02269cm
- 1
-
- = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true)
-
-
-
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!pFirma1.Value
-
-
-
-
-
-
- Textbox2
- 1.46374cm
- 6.03938cm
- 0.99688cm
- 8.02269cm
- 2
-
- = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true)
-
-
-
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
- Textbox2
- 0.10582cm
- 10.37435cm
- 0.99688cm
- 8.02269cm
- 3
-
- =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True)
-
-
-
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 27.94cm
- 21.59cm
- 0.5cm
- 0.5cm
- 0.5cm
- 0.5cm
- 0.13cm
-
-
-
-
-
-
- String
- true
- ReportParameter1
-
-
- String
- ReportParameter1
-
-
- String
- true
- ReportParameter1
-
-
- String
- true
- ReportParameter1
-
-
- String
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
-
-
- =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1")
-
-
- =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1")
-
-
- =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteActual.Value, 0), "DataSet1")
-
-
- =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1")
- true
-
-
- =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1")
-
-
- =Variables!TotalPatrimonioCActual.Value
-
-
- =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteAnterior.Value, 0),"DataSet1")
-
-
- =Variables!TotalPatrimonioCAnterior.Value
-
-
- =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value
-
-
- =Variables!TotalPatrimonioHAnterior.Value+ Variables!TotalPasivoAnterior.Value
-
-
- Cm
- 163d4464-e41c-42b9-8827-487ff815b059
-
\ No newline at end of file
diff --git a/Nomina/ConceptosEspeciales.aspx b/Nomina/ConceptosEspeciales.aspx
deleted file mode 100644
index 3bf45a5d5..000000000
--- a/Nomina/ConceptosEspeciales.aspx
+++ /dev/null
@@ -1,101 +0,0 @@
-<%@ Page Title="Nómina - Pre Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ConceptosEspeciales.aspx.vb" Inherits="Nomina_ConceptosEspeciales" %>
-
-
-
-
-
-
-
-
-
- Pre Nómina
-
-
-
-
-
-
-
-
-
-
- Proyecto:
-
-
-
-
- SubProyecto:
-
-
-
-
- Turno:
-
-
-
-
- Concepto:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Código
-
-
-
-
-
-
- Nombre
-
-
-
-
-
-
- Aplica
-
-
-
-
-
-
- Importe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Nomina/ConceptosEspeciales.aspx.vb b/Nomina/ConceptosEspeciales.aspx.vb
deleted file mode 100644
index 4c157ba35..000000000
--- a/Nomina/ConceptosEspeciales.aspx.vb
+++ /dev/null
@@ -1,119 +0,0 @@
-Option Strict On
-Option Explicit On
-
-Imports Extensiones
-Imports System.Data
-
-Partial Class Nomina_ConceptosEspeciales
- Inherits ClsPaginas
-
- Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
- CargaProyecto()
- CargaTurnos()
- End If
- End Sub
-
-#Region "CargaCombos"
-
- Private Sub CargaConceptos()
- DdlConceptos.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
- DdlConceptos.DataBind()
- End Sub
-
- Private Sub CargaProyecto()
- DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
- DdlProyecto.DataBind()
- End Sub
-
- Private Sub CargaSubProyecto()
- DdlSubProyecto.Items.Clear()
- DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
- DdlSubProyecto.DataBind()
- DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
- End Sub
-
- Private Sub CargaTurnos()
- DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- DdlTurno.DataBind()
- End Sub
-
-#End Region
-
- Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
- CargaSubProyecto()
- End Sub
-
- 'Protected Sub DdlTipoPeriodo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoPeriodo.SelectedIndexChanged
- ' CargaPeriodos()
- 'End Sub
-
- Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
- 'If DdlPeriodo.SelectedValue <> "-1" Then
- ' Dim ObjNomina As New ClsRH
-
- ' Dim FechaI, FechaF As Date
- ' FechaI = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue).Rows(0)("FechaInicio").ToString.ToDate
- ' FechaF = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue).Rows(0)("FechaFin").ToString.ToDate
-
- ' If ObjNomina.GetPreNomina(DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
- ' GvDatos.DataSource = ObjNomina.DtResultados
- ' Else
- ' GvDatos.DataSource = Nothing
- ' End If
-
- ' ObjNomina.Dispose()
-
- ' GvDatos.DataBind()
- ' UPDatos.Update()
- 'Else
- ' Alert("Debe de seleccionar el Período con el que se desea trabajar", TipoMensaje.MsgAdvertencia)
- 'End If
- End Sub
-
- Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
-
- If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
- e.Row.FCLiteral("LtlNombre").Text = "Sub Proyecto: " & e.Row.DBCampo("SubProyecto")
- 'e.Row.Cells(0).ColumnSpan = 22
- e.Row.HorizontalAlign = HorizontalAlign.Left
- ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
- e.Row.FCLiteral("LtlNombre").Text = "Turno: " & e.Row.DBCampo("Turno")
- 'e.Row.Cells(0).ColumnSpan = 22
- e.Row.HorizontalAlign = HorizontalAlign.Left
- End If
- End If
- End Sub
-
- Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
- GvDatos.ExportToExcel("ConceptosEspeciales")
- End Sub
-
- Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
- Dim ObjPersonal As New ClsRH
- ObjPersonal.IniciaTransacSQL()
-
- Dim OcurrioError As Boolean = False
- For Each Row As GridViewRow In GvDatos.Rows
- If Row.DataKey("CvePersonal") <> "" Then
- If Not ObjPersonal.UpdatePersonalMasivo(Row.FCDropDownList("DdlTurno").SelectedValue.ToEntero, Row.FCDropDownList("DdlGVSubProyecto").SelectedValue.ToEntero, Row.FCDropDownList("DdlSupervisor").SelectedValue.ToEntero,
- Row.FCTextBox("TxtSalarioDiario").Text.ToDouble, Row.FCTextBox("TxtSDI").Text.ToDouble, Row.FCTextBox("TxtSalarioCotizado").Text.ToDouble,
- Row.DataKey("CvePersonal").ToEntero, UsuarioActual.CveEmpresa) Then
- OcurrioError = True
- ObjPersonal.RollBack()
- Exit For
- End If
- End If
- Next
-
- If Not OcurrioError Then
- ObjPersonal.Commit()
- Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
- Else
- Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
- End If
-
- ObjPersonal.Dispose()
- End Sub
-End Class