Correcion en de global en servicio web del pescadito
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<%@ WebService Language="VB" Class="WSApp" %>
|
<%@ WebService Language="VB" Class="WSApp" %>
|
||||||
|
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
@@ -22,9 +22,9 @@ Imports Newtonsoft.Json.Linq
|
|||||||
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
|
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
|
||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
Public Class WSApp
|
Public Class WSApp
|
||||||
Inherits System.Web.Services.WebService
|
Inherits System.Web.Services.WebService
|
||||||
#Region "G L O B A L - D T"
|
#Region "G L O B A L - D T"
|
||||||
|
|
||||||
Public ReadOnly Property UrlSitio As String
|
Public ReadOnly Property UrlSitio As String
|
||||||
Get
|
Get
|
||||||
Return ConfigurationManager.AppSettings("UrlSitio").ToString
|
Return ConfigurationManager.AppSettings("UrlSitio").ToString
|
||||||
@@ -425,9 +425,34 @@ Public Class WSApp
|
|||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
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
|
||||||
|
|
||||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||||
@@ -448,7 +473,7 @@ Public Class WSApp
|
|||||||
Else
|
Else
|
||||||
End If
|
End If
|
||||||
ObjEmpresa.Dispose()
|
ObjEmpresa.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#Region "M E T O D O S - S E R V I C I O"
|
#Region "M E T O D O S - S E R V I C I O"
|
||||||
Public Function ValidaUsuario(CveUsuario As Integer) As Usuario
|
Public Function ValidaUsuario(CveUsuario As Integer) As Usuario
|
||||||
Dim UsuarioActual As Usuario = Nothing
|
Dim UsuarioActual As Usuario = Nothing
|
||||||
@@ -783,9 +808,9 @@ Public Class WSApp
|
|||||||
Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.")
|
Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.")
|
||||||
End If
|
End If
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "P E D I D O S"
|
#Region "P E D I D O S"
|
||||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||||
Dim Timbre As New CFDITimbre
|
Dim Timbre As New CFDITimbre
|
||||||
@@ -899,9 +924,9 @@ Public Class WSApp
|
|||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
Return Timbre
|
Return Timbre
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "R E M I S I O N E S"
|
#Region "R E M I S I O N E S"
|
||||||
Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||||
If CveSubProyecto <= 0 Then
|
If CveSubProyecto <= 0 Then
|
||||||
@@ -1430,9 +1455,10 @@ Public Class WSApp
|
|||||||
End Try
|
End Try
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
Return strBody.ToString
|
Return strBody.ToString
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Namespace WebServiceAppModels2
|
Namespace WebServiceAppModels2
|
||||||
|
|||||||
Reference in New Issue
Block a user