Correcion de global en servicio web del pescadito
This commit is contained in:
@@ -30,11 +30,11 @@ Public Class WSApp
|
|||||||
Return ConfigurationManager.AppSettings("UrlSitio").ToString
|
Return ConfigurationManager.AppSettings("UrlSitio").ToString
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1") As DataTable
|
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable
|
||||||
Get
|
Get
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
|
||||||
If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS) Then
|
If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then
|
||||||
GlobalDTPS = ObjPS.DtResultados
|
GlobalDTPS = ObjPS.DtResultados
|
||||||
Else
|
Else
|
||||||
GlobalDTPS = Nothing
|
GlobalDTPS = Nothing
|
||||||
@@ -69,16 +69,12 @@ Public Class WSApp
|
|||||||
End Property
|
End Property
|
||||||
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||||
'sino existe, recarga los datos
|
'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
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||||
Dim P As New ClsSubProyectos
|
Dim P As New ClsSubProyectos
|
||||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||||
P.Dispose()
|
P.Dispose()
|
||||||
|
|
||||||
Dim msg As String = "aqui no se carga subproyectos"
|
|
||||||
msg.GuardaLog()
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||||
@@ -98,7 +94,7 @@ Public Class WSApp
|
|||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(ByVal value As DataTable)
|
||||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -1238,9 +1234,7 @@ Public Class WSApp
|
|||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Dim TotalCalculableImpuestos As Decimal = 0
|
Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
|
|
||||||
Dim DrPS As DataRow = Nothing
|
Dim DrPS As DataRow = GlobalDTPS(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
DrPS = GlobalDTPS(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimero("") ' Estado = -1
|
|
||||||
|
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.")
|
Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.")
|
||||||
|
|||||||
Reference in New Issue
Block a user