Correcion en servicio de facturacion masiva
This commit is contained in:
@@ -1657,44 +1657,38 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
|||||||
HttpContext.Current.Application("GlobalDTProyectos") = value
|
HttpContext.Current.Application("GlobalDTProyectos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
'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)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||||
|
Dim P As New ClsSubProyectos
|
||||||
|
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||||
|
P.Dispose()
|
||||||
|
|
||||||
' If DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
|
End If
|
||||||
' Dim P As New ClsSubProyectos
|
|
||||||
' If P.GetSubProyectos Then
|
|
||||||
' HttpContext.Current.Application("GlobalDTSubProyectos") = P.DtResultados
|
|
||||||
' End If
|
|
||||||
' P.Dispose()
|
|
||||||
|
|
||||||
' Dim msg As String = "aqui no se carga subproyectos"
|
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||||
|
Dim StrSQL As New StringBuilder
|
||||||
|
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||||
|
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||||
|
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||||
|
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||||
|
|
||||||
' End If
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTSubProyectos = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
|
||||||
' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
Else
|
||||||
' Dim StrSQL As New StringBuilder
|
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
End If
|
||||||
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
|
||||||
' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
|
||||||
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
|
||||||
|
|
||||||
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
End Get
|
||||||
' GlobalDTSubProyectos = Dv.ToTable
|
Set(ByVal value As DataTable)
|
||||||
' Dv.Dispose()
|
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
' Else
|
End Set
|
||||||
' GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable)
|
End Property
|
||||||
' End If
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As DataTable)
|
|
||||||
' If value Is Nothing OrElse value.Rows.Count = 0 Then
|
|
||||||
' Dim msg As String = "aqui no se carga subproyectos"
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' HttpContext.Current.Application("GlobalDTSubProyectos") = value
|
|
||||||
' End Set
|
|
||||||
'End Property
|
|
||||||
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user