This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-07-05 10:44:48 -07:00
parent 54e8d8cde7
commit 9755e7224c
5 changed files with 45 additions and 15 deletions

View File

@@ -68,8 +68,23 @@ Partial Class RH_Asistencias
CargaSubProyecto()
End Sub
Protected Sub btnconsultarnew_Click(sender As Object, e As EventArgs)
lblFecha.Text = ""
txtFechaAsistencia.Enabled = True
Calendario.Enabled = True
btnconsultarnew.Visible = False
GV.DataSource = Nothing
GV.DataBind()
BtnGuardar.Visible = (GV.Rows.Count > 0)
UpDatos.Update()
UPFiltros.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
lblFecha.Text = txtFechaAsistencia.Text
txtFechaAsistencia.Enabled = False
Calendario.Enabled = False
btnconsultarnew.Visible = True
If txtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
Dim objpersonal As New ClsRH
If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlPuesto.SelectedValue.ToEntero) Then
Dim dt As DataTable = objpersonal.DtResultados
@@ -88,7 +103,7 @@ Partial Class RH_Asistencias
BtnGuardar.Visible = (GV.Rows.Count > 0)
UpDatos.Update()
Else
Alert("La Fecha está fuera de los parámetros establecidos, por favor revise. Fecha: " & TxtFechaAsistencia.Text, TipoMensaje.MsgAdvertencia)
Alert("La Fecha está fuera de los parámetros establecidos, por favor revise. Fecha: " & txtFechaAsistencia.Text, TipoMensaje.MsgAdvertencia)
End If
End Sub
@@ -259,5 +274,6 @@ Partial Class RH_Asistencias
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
End Class