filtrado de clasif solo las de ventas
This commit is contained in:
@@ -55,8 +55,8 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim ObjUsuarios As New ClsSisUsuarios
|
Dim ObjUsuarios As New ClsSisUsuarios
|
||||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||||
UsuarioActual.CveEmpresa = CveEmpresa
|
UsuarioActual.CveEmpresa = CveEmpresa
|
||||||
CreaObjetoEmpresa(UsuarioActual)
|
CreaObjetoEmpresa(UsuarioActual)
|
||||||
@@ -87,11 +87,11 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
Try
|
Try
|
||||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||||
|
|
||||||
If Metodo = "BASF_POG40" Then
|
If Metodo = "BASF_POG40" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaDatos(context)
|
retorno = ConsultaDatos(context)
|
||||||
@@ -104,7 +104,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
|
|
||||||
If Metodo = "ConsultarProductos" Then
|
If Metodo = "ConsultarProductos" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaProductos(context)
|
retorno = ConsultaProductos(context)
|
||||||
@@ -116,7 +116,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
|
|
||||||
If Metodo = "ConsultarClasificaciones" Then
|
If Metodo = "ConsultarClasificaciones" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaClasificaciones(context)
|
retorno = ConsultaClasificaciones(context)
|
||||||
@@ -181,7 +181,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim RespuestaError As New ResponseMsgError
|
Dim RespuestaError As New ResponseMsgError
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim strFecha = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
Dim strFecha As String = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
||||||
|
|
||||||
If String.IsNullOrEmpty(strFecha) Then
|
If String.IsNullOrEmpty(strFecha) Then
|
||||||
RespuestaError.message = "Debe especificar una fecha"
|
RespuestaError.message = "Debe especificar una fecha"
|
||||||
@@ -238,7 +238,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim RespuestaError As New ResponseMsgError
|
Dim RespuestaError As New ResponseMsgError
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
Dim CveClasificacion As String = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||||
|
|
||||||
If String.IsNullOrEmpty(CveClasificacion) Then
|
If String.IsNullOrEmpty(CveClasificacion) Then
|
||||||
CveClasificacion = "-1"
|
CveClasificacion = "-1"
|
||||||
@@ -282,7 +282,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim Clasificaciones As JArray = Nothing
|
Dim Clasificaciones As JArray = Nothing
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP())
|
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("AplicaParaVenta = 1", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP())
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RespuestaError.message = "no se pudo obtener los datos"
|
RespuestaError.message = "no se pudo obtener los datos"
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
Reference in New Issue
Block a user