From 2081642479537529aca96fd54b79a6bfbf314070 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:05:36 -0700 Subject: [PATCH 1/3] =?UTF-8?q?Cambio=20para=20llenar=20los=20a=C3=B1os=20?= =?UTF-8?q?sin=20usar=20la=20base=20de=20datos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 19 +++++++++++-------- App_Code/ClsAcumuladores.vb | 14 -------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 4043c344f..8e389cde6 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -9,6 +9,7 @@ Partial Class Acumuladores_RepEntradasUsados Private DiasSemana(7) As String Private Meses(12) As String + Private Cargado As Integer = 0 Private Property DatosEntradasUsados() As DataTable Get @@ -25,8 +26,6 @@ Partial Class Acumuladores_RepEntradasUsados txtFechaF.Text = Today CargarDatos() CargarCombos() - - End If End Sub @@ -36,14 +35,18 @@ Partial Class Acumuladores_RepEntradasUsados End Sub Protected Sub CargarCombos() - Dim ObjAcum As New ClsAcumuladores Dim fecha As Date = Date.Now.AddMonths(-1) - ObjAcum.GetAñosVentas(UsuarioActual.CveEmpresa) - DdlAño.DataSource = ObjAcum.DtResultados - DdlAño.DataBind() - DdlAño.SelectedValue = fecha.Year.ToEntero - ObjAcum.Dispose() + Dim Años As New ListItem + Dim i As Integer + If Cargado = 0 Then + For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 + Años = New ListItem(i, i) + DdlAño.Items.Add(Años) + Next + End If + Cargado = 1 + DdlAño.SelectedValue = fecha.Year.ToEntero DdlMes.SelectedValue = fecha.Month.ToEntero End Sub diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index be1ec4b01..940bf0817 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1206,20 +1206,6 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function GetAñosVentas(CveEmprea As Integer) As Boolean - Dim Retorno As Boolean = False - SqlDataAdapter(String.Format("select top 6 year(Fecha) as Año from Ventas where CveEmpresa = {0} group by year(Fecha) Order by year(Fecha) desc", CveEmprea.ToString), CommandType.Text) - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError(String.Format("Ocurrió un error al consultar los año de venta"), ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - - End Function - #Region " IDisposable Support " ' IDisposable From 21745c0736dd4aa0add33f4e128cf8415a835119 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:42:38 -0700 Subject: [PATCH 2/3] Cambios en etiquetas y nombres --- Acumuladores/EntradasUsadosResumenRep.aspx | 2 +- Acumuladores/RepEntradasUsadosClientes.aspx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx b/Acumuladores/EntradasUsadosResumenRep.aspx index 9fe1ff8df..67f945d0f 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx +++ b/Acumuladores/EntradasUsadosResumenRep.aspx @@ -14,7 +14,7 @@
  • - +
  • diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index a2dd036e1..7b495acc8 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -16,7 +16,7 @@
  • - +
  • @@ -39,7 +39,7 @@
    -
    Almacen:
    +
    Almacén:
    From dc25d760b935bd01413bf7700d5643c0bb302630 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:44:18 -0700 Subject: [PATCH 3/3] Cambio en parametros de fecha incio y fecha fin --- Contabilidad/PolizasImpresion.aspx.vb | 4 ++-- Contabilidad2/PolizasImpresion.aspx.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad/PolizasImpresion.aspx.vb b/Contabilidad/PolizasImpresion.aspx.vb index 7450186f7..d597518c4 100644 --- a/Contabilidad/PolizasImpresion.aspx.vb +++ b/Contabilidad/PolizasImpresion.aspx.vb @@ -49,8 +49,8 @@ Partial Class Contabilidad_PolizasImpresion Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) - params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text)) + params.Add(New ReportParameter("FFin", TxtFechaFin.Text)) params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString)) diff --git a/Contabilidad2/PolizasImpresion.aspx.vb b/Contabilidad2/PolizasImpresion.aspx.vb index 992887fb8..7bd641e54 100644 --- a/Contabilidad2/PolizasImpresion.aspx.vb +++ b/Contabilidad2/PolizasImpresion.aspx.vb @@ -51,8 +51,8 @@ Partial Class Contabilidad2_PolizasImpresion Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) - params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text)) + params.Add(New ReportParameter("FFin", TxtFechaFin.Text)) params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))