Limpieza masiva ClsPaginas
-RegistraScript se unifica en una sola clase static/shared y se simplica el código -Alert se vuelve estático -Random() no se manda a crear cada vez que se registra un script (esto tenía un costo alto) -Se corrigieron unos errores en los nombres de funciones -Las clases que ya heredan de Clspaginas, se les quita el this a RegistraScript y a Alert puesto que era innecesario (y además al haberlos vuelto métodos estáticos, NO pueden llamarse de un this)
This commit is contained in:
@@ -96,7 +96,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas
|
||||
limpiarCamposModal();
|
||||
UPModalConcepto.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModalConcepto').modal();");
|
||||
RegistraScript("$('#DivModalConcepto').modal();");
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
@@ -112,7 +112,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas
|
||||
|
||||
UPModalConcepto.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModalConcepto').modal();");
|
||||
RegistraScript("$('#DivModalConcepto').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardarConcepto_Click(object sender, EventArgs e)
|
||||
@@ -142,7 +142,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas
|
||||
|
||||
ObjBanco.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModalConcepto').modal('hide');");
|
||||
RegistraScript("$('#DivModalConcepto').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public partial class RH_DiasFestivos : ClsPaginas
|
||||
}
|
||||
protected void LnkAgregarDias_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.RegistraScript("$('#DModalDiasFestivos').modal();");
|
||||
RegistraScript("$('#DModalDiasFestivos').modal();");
|
||||
LimpiaDiasFestivos();
|
||||
BtnDiasADD.Visible = true;
|
||||
UPModalDias.Update();
|
||||
@@ -48,11 +48,11 @@ public partial class RH_DiasFestivos : ClsPaginas
|
||||
ObjDias.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalDiasFestivos').modal('hide');");
|
||||
RegistraScript("$('#DModalDiasFestivos').modal('hide');");
|
||||
LimpiaDiasFestivos();
|
||||
CargaDiasFestivos();
|
||||
UPModalDias.Update();
|
||||
this.Alert("El dìa festivos se ha agregado");
|
||||
Alert("El dìa festivos se ha agregado");
|
||||
}
|
||||
}
|
||||
protected void LnkEliminarDias_Click(object sender, EventArgs e)
|
||||
@@ -65,7 +65,7 @@ public partial class RH_DiasFestivos : ClsPaginas
|
||||
if (Continuar)
|
||||
{
|
||||
CargaDiasFestivos();
|
||||
this.Alert("El dìa festivos se ha Eliminado");
|
||||
Alert("El dìa festivos se ha Eliminado");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7181,10 +7181,10 @@ Partial Class RH_Personal
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#DModalMovtoPermanente').modal('hide');")
|
||||
RegistraScript("$('#DModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha agregado el movimiento permanente")
|
||||
Alert("Se ha agregado el movimiento permanente")
|
||||
End If
|
||||
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide')")
|
||||
@@ -7207,10 +7207,10 @@ Partial Class RH_Personal
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha actualizado el movimiento permanente")
|
||||
Alert("Se ha actualizado el movimiento permanente")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -7229,10 +7229,10 @@ Partial Class RH_Personal
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha eliminadó el movimiento permanente")
|
||||
Alert("Se ha eliminadó el movimiento permanente")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -7386,7 +7386,7 @@ Partial Class RH_Personal
|
||||
If Continuar Then
|
||||
CargaPersonalIncapacidad()
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
Me.Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion)
|
||||
Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion)
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')")
|
||||
End If
|
||||
End Sub
|
||||
@@ -7412,7 +7412,7 @@ Partial Class RH_Personal
|
||||
If Continuar Then
|
||||
CargaPersonalIncapacidad()
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
Me.Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion)
|
||||
Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion)
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user