concepto,Turno
This commit is contained in:
@@ -27,7 +27,7 @@ Partial Class RH_CatTurno
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjRH As New ClsRH()
|
||||
If ObjRH.GetTurnos Then
|
||||
If ObjRH.GetTurnos(UsuarioActual.CveEmpresa) Then
|
||||
GvTurno.DataSource = ObjRH.DtResultados.FiltraParametros(" CveEmpresa =" & UsuarioActual.CveEmpresa)
|
||||
GvTurno.DataBind()
|
||||
End If
|
||||
@@ -36,26 +36,28 @@ Partial Class RH_CatTurno
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarTurno_Click(sender As Object, e As EventArgs) Handles BtnAgregarTurno.Click
|
||||
Dim ObjRH As New ClsRH
|
||||
Dim Estatus As Boolean = False
|
||||
If ChkEstatus.Checked Then Estatus = True
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjRH.AddTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero()) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
Using ObjRH As New ClsRH
|
||||
Dim Estatus As Boolean = False
|
||||
Dim comida As Integer = If(chkComida.Checked, 1, 0)
|
||||
If ChkEstatus.Checked Then Estatus = True
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjRH.AddTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjRH.UpdateTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, Estatus, HdnID.Value.ToEntero(), UsuarioActual.CveUsuario, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjRH.UpdateTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, Estatus, HdnID.Value.ToEntero(), UsuarioActual.CveUsuario, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero()) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddTurno"))
|
||||
ObjRH.Dispose()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
@@ -75,6 +77,11 @@ Partial Class RH_CatTurno
|
||||
TxtFretardo.Text = (GvRow.DataKey("ToleranciaEFalta2").ToEntero()).ToString()
|
||||
TxtFsalida.Text = GvRow.DataKey("ToleranciaSFalta")
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
chkComida.Checked = (GvRow.DataKey("Comida") = "1")
|
||||
TxtComidade.Text = GvRow.DataKey("ComidaDe")
|
||||
TxtComidaA.Text = GvRow.DataKey("ComidaA")
|
||||
|
||||
|
||||
UpAddTurno.Update()
|
||||
|
||||
'CargaGlobalDTTurno()
|
||||
|
||||
Reference in New Issue
Block a user