137 lines
4.5 KiB
VB.net
137 lines
4.5 KiB
VB.net
Imports System.Data
|
|
Imports Extensiones
|
|
|
|
|
|
Partial Class RH_DocumentacionVencida
|
|
Inherits ClsPaginas
|
|
|
|
|
|
|
|
Private Sub RH_DocumentacionVencida_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
If Not Page.IsPostBack Then
|
|
CargaCombos()
|
|
TxtFechaI.Text = NowADS().AddDays(-15).ToString("dd/MM/yyyy")
|
|
TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CargaCombos()
|
|
|
|
|
|
Dim objRh As New ClsRH
|
|
Dim objClientes As New ClsClientes
|
|
Dim objEdoc As New ClsEdoc
|
|
|
|
|
|
If objEdoc.DocumentacionElectronicaDDLGet(-1, UsuarioActual.CveEmpresa) Then
|
|
DDlDocumentacion.DataSource = objEdoc.DtResultados
|
|
DDlDocumentacion.DataBind()
|
|
DDlDocumentacion.Items.Insert(0, New ListItem("Seleccione una opción", "-1"))
|
|
End If
|
|
|
|
If objEdoc.DocumentacionElectronicaTipoGett(UsuarioActual.CveEmpresa) Then
|
|
DDLDocumentacionTipo.DataSource = objEdoc.DtResultados
|
|
DDLDocumentacionTipo.DataBind()
|
|
DDLDocumentacionTipo.Items.Insert(0, New ListItem("Seleccione una opción", "-1"))
|
|
End If
|
|
|
|
If objClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.Empresa.CveEmpresa) Then
|
|
DDLClientes.DataSource = objClientes.DtResultados 'DDlclientes
|
|
DDLClientes.DataBind()
|
|
DDLClientes.Items.Insert(0, New ListItem("Seleccione un cliente", "-1"))
|
|
|
|
End If
|
|
|
|
If objRh.GetPersonal(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
|
DDLPersonal.DataSource = objRh.DtResultados
|
|
DDLPersonal.DataBind()
|
|
DDLPersonal.Items.Insert(0, New ListItem("Seleccione una opicon", "-1"))
|
|
'dttemp = objRh.DtResultados
|
|
End If
|
|
|
|
|
|
If objRh.GetPuestos() Then
|
|
DDLPuesto.DataSource = objRh.DtResultados.FiltraParametros(" CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa & " ")
|
|
DDLPuesto.DataBind()
|
|
DDLPuesto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
|
End If
|
|
|
|
|
|
DDLSucursal.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa)
|
|
DDLSucursal.DataBind()
|
|
DDLSucursal.Items.Insert(0, New ListItem("Seleccione una sucursal", "-1"))
|
|
|
|
DdlPuesto.DataSource = GlobalDTPuestos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
DdlPuesto.DataBind()
|
|
|
|
objClientes.Dispose()
|
|
objRh.Dispose()
|
|
objEdoc.Dispose()
|
|
End Sub
|
|
|
|
Private Sub CargaDatos()
|
|
|
|
End Sub
|
|
|
|
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
|
Dim objEDoc As New ClsEdoc
|
|
|
|
If objEDoc.DocumentacionVenciadaRepGet(DdlTipo.SelectedValue.ToEntero, DDLPersonal.SelectedValue.ToEntero, -1, UsuarioActual.Empresa.CveEmpresa, DDlDocumentacion.SelectedValue.ToEntero, DDLDocumentacionTipo.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, DDLSucursal.SelectedValue.ToEntero, DDLPuesto.SelectedValue.ToEntero, DDLVencidos.SelectedValue.ToEntero) Then
|
|
GvDocumentos.DataSource = objEDoc.DtResultados
|
|
End If
|
|
objEDoc.Dispose()
|
|
GvDocumentos.DataBind()
|
|
UpGvDatos.Update()
|
|
|
|
|
|
End Sub
|
|
|
|
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipo.SelectedIndexChanged
|
|
|
|
'If DdlTipo.SelectedIndex = 0 Then
|
|
' DDLClientes.Visible = False
|
|
' DDLPersonal.Visible = False
|
|
' DDLPuesto.Visible = False
|
|
|
|
' LtlPersonal.Visible = False
|
|
' LtlPuesto.Visible = False
|
|
' LtlClietes.Visible = False
|
|
|
|
' DDLPersonal.SelectedIndex = 0
|
|
' DDLClientes.SelectedIndex = 0
|
|
' DDLPersonal.SelectedIndex = 0
|
|
|
|
'End If
|
|
|
|
If DdlTipo.SelectedIndex = 0 Then
|
|
DDLClientes.Visible = False
|
|
DDLClientes.SelectedIndex = 0
|
|
LtlClietes.Visible = False
|
|
|
|
DDLPersonal.Visible = True
|
|
DDLPuesto.Visible = True
|
|
|
|
LtlPersonal.Visible = True
|
|
LtlPuesto.Visible = True
|
|
|
|
End If
|
|
|
|
If DdlTipo.SelectedIndex = 1 Then
|
|
DDLClientes.Visible = True
|
|
|
|
DDLPersonal.Visible = False
|
|
DDLPuesto.Visible = False
|
|
|
|
LtlPersonal.Visible = False
|
|
LtlPuesto.Visible = False
|
|
LtlClietes.Visible = True
|
|
|
|
DDLPersonal.SelectedIndex = 0
|
|
DDLPuesto.SelectedIndex = 0
|
|
End If
|
|
|
|
|
|
UpFiltros.Update()
|
|
End Sub
|
|
End Class
|