From ffb32eb558e8e07a728bbcf201ee89a5b4a4a390 Mon Sep 17 00:00:00 2001 From: MLopez Date: Fri, 24 Feb 2023 16:14:20 -0700 Subject: [PATCH 1/3] =?UTF-8?q?Se=20reintroducen=20los=20GlobalDT=20de=20P?= =?UTF-8?q?S=20Caracter=C3=ADsticas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CAMBIOS EN BD VENTAS: - PA_GRAL_ProductosServiciosCaracteristicasGet - PA_GRAL_ProductosServiciosCaracteristicasOpcionesGet El parámetro @CveEmpresa INT se vuelve requerido. --- ...lsGralProductosServiciosCaracteristicas.vb | 4 +-- App_Code/ClsPaginas.vb | 36 ++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/App_Code/ClsGralProductosServiciosCaracteristicas.vb b/App_Code/ClsGralProductosServiciosCaracteristicas.vb index 8ee0d7822..593903c4f 100644 --- a/App_Code/ClsGralProductosServiciosCaracteristicas.vb +++ b/App_Code/ClsGralProductosServiciosCaracteristicas.vb @@ -100,7 +100,7 @@ Public Class ClsGralProductosServiciosCaracteristicas #End Region #Region "ProductosServiciosCaracteristicas" - Public Function GetProductosServiciosCaracteristicas(Optional CveEmpresa As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean + Public Function GetProductosServiciosCaracteristicas(CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GRAL_ProductosServiciosCaracteristicasGet") @@ -203,7 +203,7 @@ Public Class ClsGralProductosServiciosCaracteristicas #Region "ProductosServiciosCaracteristicasOpciones" - Public Function GetProductosServiciosCaracteristicasOpciones(Optional CveEmpresa As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean + Public Function GetProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GRAL_ProductosServiciosCaracteristicasOpcionesGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1c88a95eb..dc48e03e1 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1659,18 +1659,20 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosCaracteristicas = DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable) + Dim AppNombre As String = $"GlobalDTProductosServiciosCaracteristicas-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjProductosServiciosCaracteristicas As New ClsGralProductosServiciosCaracteristicas + If ObjProductosServiciosCaracteristicas.GetProductosServiciosCaracteristicas(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProductosServiciosCaracteristicas.DtResultados + End Using End If + GlobalDTProductosServiciosCaracteristicas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTProductosServiciosCaracteristicas") = value + Dim AppNombre As String = $"GlobalDTProductosServiciosCaracteristicas-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTPSAdicionales(CvePS As Integer, CveEmpresa As Integer) As DataTable @@ -1695,18 +1697,20 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable) + Dim AppNombre As String = $"GlobalDTProductosServiciosCaracteristicasOpciones-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjProductosServiciosCaracteristicas As New ClsGralProductosServiciosCaracteristicas + If ObjProductosServiciosCaracteristicas.GetProductosServiciosCaracteristicasOpciones(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProductosServiciosCaracteristicas.DtResultados + End Using End If + GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value + Dim AppNombre As String = $"GlobalDTProductosServiciosCaracteristicasOpciones-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTInvMetodosInventario() As DataTable From f635988991d414bcbcdcfbdc7f0606c9c818c317 Mon Sep 17 00:00:00 2001 From: MLopez Date: Fri, 24 Feb 2023 17:14:41 -0700 Subject: [PATCH 2/3] =?UTF-8?q?Corregir=20tama=C3=B1o=20botones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/CatContaEjercicios.aspx | 57 ++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/Contabilidad2/CatContaEjercicios.aspx b/Contabilidad2/CatContaEjercicios.aspx index 7410bbd41..43e5f2be4 100644 --- a/Contabilidad2/CatContaEjercicios.aspx +++ b/Contabilidad2/CatContaEjercicios.aspx @@ -1,9 +1,53 @@ <%@ Page Title="Contabilidad2 - Catálogo Ejercicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatContaEjercicios.aspx.vb" Inherits="Contabilidad2_CatContaEjercicios" %> -<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + @@ -23,7 +67,7 @@ - @@ -34,17 +78,20 @@ - + - + - + From 74c40041c3cac95a874663f1ece73d702494e92b Mon Sep 17 00:00:00 2001 From: MLopez Date: Fri, 24 Feb 2023 20:44:58 -0700 Subject: [PATCH 3/3] =?UTF-8?q?Ocultar=20bot=C3=B3n=20de=20'Generar=20Sali?= =?UTF-8?q?da'=20dependiendo=20si=20el=20folio=20ya=20tiene=20un=20movimie?= =?UTF-8?q?nto=20de=20salida=20existente=20+=20Col=20Mov.=20Salida?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CAMBIOS BD (VENTAS): PA_Acum_FoliosGarantiaGet, left join Inv_Movimientos + Cols CveMovimiento, Folio --- Acumuladores/CatFoliosGarantia.aspx | 3 ++- Acumuladores/CatFoliosGarantia.aspx.vb | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index 9633d73ca..9d44d0e67 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -121,7 +121,7 @@ + diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index 739276730..1ac31b0e6 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -20,6 +20,21 @@ Partial Class Acumuladores_CatFoliosGarantia End Property + Private Property CveMovimiento As Integer + Get + If ViewState("CveMovimiento") IsNot Nothing Then + Return ViewState("CveMovimiento").ToString.ToEntero + Else + Return -1 + End If + + End Get + Set(value As Integer) + ViewState("CveMovimiento") = value + End Set + + End Property + Private Property Actualizar As Boolean Get If Not ViewState("Actualizar") Is Nothing Then @@ -219,13 +234,14 @@ Partial Class Acumuladores_CatFoliosGarantia Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) CveFolioGarantia = GvRow.DataKey("CveFolioGarantia") - + CveMovimiento = IIf(GvRow.DataKey("CveMovimiento") <> "", GvRow.DataKey("CveMovimiento"), -1) LblFolio.Text = GvRow.DataKey("FolioGarantia") Using ObjAcum As New ClsAcumuladores If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=DdlEstatusConsecutivo.SelectedValue.ToEntero()) Then GvGarantiasDetalle.DataSource = ObjAcum.DtResultados HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia + HplGenerarSalida.Visible = (CveMovimiento = -1) End If End Using GvGarantiasDetalle.DataBind()