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() 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 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 @@ - + - + - +