OI Temas, Cat Checadores
This commit is contained in:
@@ -126,6 +126,33 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CvePersonalSeleccionado As Integer
|
||||
Get
|
||||
If ViewState("CvePersonalSeleccionado") Is Nothing Then
|
||||
ViewState("CvePersonalSeleccionado") = -1
|
||||
End If
|
||||
Return ViewState("CvePersonalSeleccionado").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePersonalSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FechaSeleccionada As Date
|
||||
Get
|
||||
If ViewState("FechaSeleccionada") Is Nothing Then
|
||||
ViewState("FechaSeleccionada") = MinFecha
|
||||
End If
|
||||
Return ViewState("FechaSeleccionada").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaSeleccionada") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -408,20 +435,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
'If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
|
||||
If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
BtnAgregar.Visible = False
|
||||
BtnEstusAsistenciaModal.Visible = False
|
||||
DdlAsistenciaInacistencia.Enabled = False
|
||||
Else
|
||||
BtnAgregar.Visible = True
|
||||
BtnEstusAsistenciaModal.Visible = True
|
||||
DdlAsistenciaInacistencia.Enabled = True
|
||||
End If
|
||||
UpAgregar.Update()
|
||||
End If
|
||||
' If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
' BtnAgregar.Visible = False
|
||||
' BtnEstusAsistenciaModal.Visible = False
|
||||
' 'DdlAsistenciaInacistencia.Enabled = False
|
||||
' Else
|
||||
' BtnAgregar.Visible = True
|
||||
' BtnEstusAsistenciaModal.Visible = True
|
||||
' 'DdlAsistenciaInacistencia.Enabled = True
|
||||
' End If
|
||||
' UpAgregar.Update()
|
||||
'End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
@@ -1499,7 +1526,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
|
||||
|
||||
lnkLink.CommandArgument = lnkLink.Text
|
||||
lnkLink.CommandArgument = $"{lnkLink.Text}|{e.Row.DataKey("CvePersonal")}|{e.Row.DataKey("NombreCompleto")}"
|
||||
|
||||
If Instruccion = "-" Then
|
||||
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
|
||||
@@ -1620,6 +1647,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CvePersonalSeleccionado = -1
|
||||
|
||||
Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim DTDatos As New DataTable
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable
|
||||
@@ -1640,6 +1669,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
objRH.Dispose()
|
||||
|
||||
Instruccion = arrayComands(0)
|
||||
CvePersonalSeleccionado = arrayComands(2).ToEntero
|
||||
|
||||
LtlAsistenciaHorariosModal.Text = arrayComands(3)
|
||||
|
||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
|
||||
|
||||
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||
@@ -1662,6 +1695,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DTDatos = DtResultados.FiltraParametros(Filtro)
|
||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||
FechaSeleccionada = DTDatos(0)("Fecha").ToString().ToDate
|
||||
|
||||
lnkModalImg.Text = ""
|
||||
|
||||
@@ -1949,4 +1983,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada,
|
||||
DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
Alert("Registro Actualziado Correctamente.")
|
||||
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user