Correcion en de global en servicio web del pescadito
This commit is contained in:
@@ -426,6 +426,31 @@ Public Class WSApp
|
|||||||
Application("GlobalDTMotivosHorasExtras") = value
|
Application("GlobalDTMotivosHorasExtras") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||||
|
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
|
||||||
|
If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados
|
||||||
|
ObjUnidadesMedida.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveEmpresa <> -1 Then
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTUnidadesMedida = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
Else
|
||||||
|
GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa)
|
||||||
|
Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Property CveEmpresa As Integer = 143
|
Public Property CveEmpresa As Integer = 143
|
||||||
@@ -1433,6 +1458,7 @@ Public Class WSApp
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Namespace WebServiceAppModels2
|
Namespace WebServiceAppModels2
|
||||||
|
|||||||
Reference in New Issue
Block a user