-- modificaciones de carta porte
This commit is contained in:
@@ -87,6 +87,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
GETPSUSADOS(context)
|
||||
Case "getumsat"
|
||||
GETUMSAT(context)
|
||||
Case "getsatmatpeligroso"
|
||||
GETSATMaterialPeligroso(context)
|
||||
Case "getsatembalajes"
|
||||
GETSATEmbalajes(context)
|
||||
Case "getcliente"
|
||||
GetClientes(context)
|
||||
Case "getproveedores"
|
||||
@@ -1054,6 +1058,84 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region " GET SAT CARTA PORTE "
|
||||
Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTMaterialPeligroso") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetMaterialPeligroso Then context.Application("GlobalDTMaterialPeligroso") = ObjGrales.DtResultados Else context.Application("GlobalDTMaterialPeligroso") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTMaterialPeligroso"), DataTable).AsEnumerable
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
|
||||
If Name <> "-1" Then
|
||||
DTUM = DTUM.Where((Function(a) a!ClaveMaterialPeligrosoDescripcion.ToString.ToLower Like ("*" + Name.ToLower + "*")))
|
||||
End If
|
||||
|
||||
If DTUM.Count > 0 Then
|
||||
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!ClaveMaterialPeligrosoDescripcion).CopyToDataTable).ToTable(True, {"CveMaterialPeligroso", "ClaveMaterialPeligrosoDescripcion"})
|
||||
Else
|
||||
DtPSRetorno = Nothing
|
||||
End If
|
||||
|
||||
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
||||
DtPSRetorno.Columns("CveMaterialPeligroso").ColumnName = "id"
|
||||
DtPSRetorno.Columns("ClaveMaterialPeligrosoDescripcion").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
DtPSRetorno.Dispose()
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Private Function GETSATEmbalajes(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTEmbalajes") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetEmbalajes Then context.Application("GlobalDTEmbalajes") = ObjGrales.DtResultados Else context.Application("GlobalDTEmbalajes") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTEmbalajes"), DataTable).AsEnumerable
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
|
||||
If Name <> "-1" Then
|
||||
DTUM = DTUM.Where((Function(a) a!ClaveEmbalajeDescripcion.ToString.ToLower Like ("*" + Name.ToLower + "*")))
|
||||
End If
|
||||
|
||||
If DTUM.Count > 0 Then
|
||||
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!ClaveEmbalajeDescripcion).CopyToDataTable).ToTable(True, {"CveEmbalaje", "ClaveEmbalajeDescripcion"})
|
||||
Else
|
||||
DtPSRetorno = Nothing
|
||||
End If
|
||||
|
||||
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
||||
DtPSRetorno.Columns("CveEmbalaje").ColumnName = "id"
|
||||
DtPSRetorno.Columns("ClaveEmbalajeDescripcion").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
DtPSRetorno.Dispose()
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GET FRACCION ARANCELARIA "
|
||||
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
Reference in New Issue
Block a user