This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-10-28 10:48:26 -07:00
parent 370ec5a035
commit 757f5b63a9
11 changed files with 193 additions and 82 deletions

View File

@@ -217,6 +217,7 @@ Partial Class Nomina_CatPeriodos
Private Sub LnkAddPeriodo_Click(sender As Object, e As EventArgs) Handles LnkAddPeriodo.Click
LimpiarModal()
Comando = "Agregar"
TxtCveSubTipoPeriodoAdd.Text = "1"
lblTiulomodal.Text = "Agregar Periodo"
RegistraScript("$('#divAddPeriodo').modal('show');")
End Sub
@@ -238,7 +239,10 @@ Partial Class Nomina_CatPeriodos
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero()
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero()
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero()
Dim CveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoAdd.Text.ToEntero()
If CveSubTipoPeriodo <= 1 Then
CveSubTipoPeriodo = 1
End If
For Each item As ListItem In CBLchk.Items
Select Case item.Value.ToEntero()
Case 1
@@ -259,7 +263,7 @@ Partial Class Nomina_CatPeriodos
Next
If Comando = "Agregar" Then
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero()) Then
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update()
@@ -275,7 +279,7 @@ Partial Class Nomina_CatPeriodos
End If
ElseIf Comando = "Actualizar" Then
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero()) Then
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update()
@@ -312,6 +316,8 @@ Partial Class Nomina_CatPeriodos
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString()
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString().ToEntero())
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString()
TxtCveSubTipoPeriodoAdd.Text = GvRow.DataKey("CveSubTipoPeriodo").ToString()
For Each item As ListItem In CBLchk.Items
Select Case item.Value.ToEntero()
Case 1