agregando dropdownlost al resguardo material
This commit is contained in:
@@ -41,6 +41,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
GetUser(context)
|
||||
Case "ActualizaPreP"
|
||||
ActualizaPrePoliza(context)
|
||||
Case "getpersonal"
|
||||
getpersonal(context)
|
||||
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
@@ -686,4 +688,50 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Personal"
|
||||
Private Function getpersonal(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
CveEmpresa = usuario.CveEmpresa
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If context.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjProveedores As New ClsRH
|
||||
If ObjProveedores.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, usuario.CveEmpresa) Then
|
||||
context.Application(AppNombre) = ObjProveedores.DtResultados
|
||||
End If
|
||||
ObjProveedores.Dispose()
|
||||
End If
|
||||
|
||||
'Dim ObjProveedores As New ClsCompProveedores
|
||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||
' DtRetorno = ObjProveedores.DtResultados
|
||||
'End If
|
||||
'ObjProveedores.Dispose()
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros($"Nombre like '%{Name}%'")
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
DtRetorno.Columns("CvePersonal").ColumnName = "id"
|
||||
DtRetorno.Columns("Nombre").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
Reference in New Issue
Block a user