estatuse incapacidad personal
This commit is contained in:
@@ -16,6 +16,18 @@ Partial Class RH_Personal
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
|
||||
Property CcveMovtoPermanente As Integer
|
||||
Get
|
||||
If ViewState("CcveMovtoPermanente") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CcveMovtoPermanente"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CcveMovtoPermanente") = value
|
||||
End Set
|
||||
End Property
|
||||
Property CveFonacot As Integer
|
||||
Get
|
||||
If ViewState("CveFonacot") Is Nothing Then
|
||||
@@ -218,6 +230,17 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Private Property dtNomConceptos As Data.DataTable
|
||||
Get
|
||||
Return CType(ViewState("dtNomConceptos"), DataTable)
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("dtNomConceptos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtCuentasContables As Data.DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtCuentasContables"), DataTable)
|
||||
@@ -825,6 +848,10 @@ Partial Class RH_Personal
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
'
|
||||
Using objno = New ClsNominas
|
||||
objno.GetConceptos()
|
||||
dtNomConceptos = objno.DtResultados
|
||||
End Using
|
||||
PnlSalarios.Visible = showsalarios
|
||||
|
||||
ViewState("Orden") = ""
|
||||
@@ -877,6 +904,8 @@ Partial Class RH_Personal
|
||||
'CvePersonal = ViewState("CvePersonal").ToString().ToEntero()
|
||||
CargaDatos()
|
||||
CargaDocumentacionFirmaDecontratos()
|
||||
CargaPersonalIncapacidad()
|
||||
CargaMovtoPermanente()
|
||||
'LnkAddLicencias.Visible = True
|
||||
'TabLicencias.Visible = True
|
||||
'Configuración de Modalidad Update
|
||||
@@ -1663,6 +1692,8 @@ Partial Class RH_Personal
|
||||
'End If
|
||||
|
||||
DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString()
|
||||
LnkActivar.Visible = (ObjPersonal.CveEstatusPersonal = 2)
|
||||
LnkDesactivar.Visible = Not LnkActivar.Visible
|
||||
CargaEstatusPersonal(DdlEstatusPersonal.SelectedValue.ToEntero())
|
||||
MostrarOcultarFechasEstatus()
|
||||
|
||||
@@ -7062,5 +7093,373 @@ Partial Class RH_Personal
|
||||
|
||||
End Using
|
||||
End Sub
|
||||
#Region "movtosPermanentes"
|
||||
Protected Sub CargaTipoConcepto()
|
||||
CargaConcepto()
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaConcepto()
|
||||
Dim dt As DataTable = dtNomConceptos.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'")
|
||||
DdlConcepto.Items.Clear()
|
||||
|
||||
If DdlTipo.SelectedValue.Contiene("P", "D", "O") Then
|
||||
DdlConcepto.DataSource = dt.FiltraParametros(String.Format("Tipo ='{0}'", DdlTipo.SelectedValue))
|
||||
End If
|
||||
|
||||
Dim drow As DataRow = dt.NewRow()
|
||||
drow("CveConcepto") = "-1"
|
||||
drow("Concepto") = "Seleccione"
|
||||
dt.Rows.InsertAt(drow, 0)
|
||||
DdlConcepto.DataSource = dt
|
||||
DdlConcepto.SelectedValueExist("-1")
|
||||
DdlConcepto.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMovtoPermanente()
|
||||
Using ObjMovt As ClsNominas = New ClsNominas()
|
||||
ObjMovt.GetMovtoPermanente(UsuarioActual.CveEmpresa, CvePersonal)
|
||||
GVMovtoPermanente.DataSource = ObjMovt.DtResultados
|
||||
End Using
|
||||
|
||||
GVMovtoPermanente.DataBind()
|
||||
UpMovtosPermanentes.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipo_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
CargaConcepto()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAddMovtoPermanente_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
CargaConcepto()
|
||||
DdlTipoDescto_SelectedIndexChanged(Nothing, Nothing)
|
||||
pnlAddupMovto.Visible = True
|
||||
LnkAddMovto.Visible = True
|
||||
LnkUpMovto.Visible = False
|
||||
LtlMovtoPermanenteaddup.Text = "Agregar Movimiento"
|
||||
TxtDescripcion.Text = ""
|
||||
TxtValor.Text = ""
|
||||
TxtVecesAplicar.Text = ""
|
||||
TxtMontoLimite.Text = ""
|
||||
TxtFechaAplicacion.Text = ""
|
||||
ChkEstatus.Visible = True
|
||||
ChkEstatus.Checked = True
|
||||
UpMovtosPermanentesModal.Update()
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal()")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAddMovto_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim cveConcepto As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim descripcion As String = TxtDescripcion.Text
|
||||
Dim tipoDescuento As Integer = DdlTipoDescto.SelectedValue.ToEntero()
|
||||
Dim valor As Double = TxtValor.Text.ToDouble()
|
||||
Dim vecesAplicar As Integer = TxtVecesAplicar.Text.ToEntero()
|
||||
Dim montoLimite As Decimal = TxtMontoLimite.Text.ToDecimal()
|
||||
Dim fechaInicioAplicacion As String = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd")
|
||||
Dim estatus As Boolean = ChkEstatus.Checked
|
||||
Dim CveCuenta As Integer = DdlCtaContable.SelectedValue.ToEntero() * (If(DdlCtaContable.DataValueField = "Id", -1, 1))
|
||||
Dim Continuar As Boolean
|
||||
|
||||
Using ObjMovt As ClsNominas = New ClsNominas()
|
||||
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, CvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) > 0
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#DModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha agregado el movimiento permanente")
|
||||
End If
|
||||
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide')")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkUpMovto_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim cveConcepto As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim descripcion As String = TxtDescripcion.Text
|
||||
Dim tipoDescuento As Integer = DdlTipoDescto.SelectedValue.ToEntero()
|
||||
Dim valor As Double = TxtValor.Text.ToDouble()
|
||||
Dim vecesAplicar As Integer = TxtVecesAplicar.Text.ToEntero()
|
||||
Dim montoLimite As Decimal = TxtMontoLimite.Text.ToDecimal()
|
||||
Dim fechaInicioAplicacion As String = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd")
|
||||
Dim estatus As Boolean = ChkEstatus.Checked
|
||||
Dim CveCuenta As Integer = DdlCtaContable.SelectedValue.ToEntero() * (If(DdlCtaContable.DataValueField = "Id", -1, 1))
|
||||
Dim Continuar As Boolean
|
||||
|
||||
Using ObjMovt As ClsNominas = New ClsNominas()
|
||||
Continuar = ObjMovt.UpMovtoPermanente(CcveMovtoPermanente, cveConcepto, CvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta)
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha actualizado el movimiento permanente")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoDescto_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
pnlMonto.Visible = DdlTipoDescto.SelectedValue.ToEntero() > 2
|
||||
pnlVecesAplicar.Visible = DdlTipoDescto.SelectedValue.ToEntero() < 3
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkremoveMovtoPermanente_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim gvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero()
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Using ObjMovt As ClsNominas = New ClsNominas()
|
||||
Continuar = ObjMovt.RemoveMovtoPermanente(CcveMovtoPermanente)
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');")
|
||||
CargaMovtoPermanente()
|
||||
UpMovtosPermanentes.Update()
|
||||
Me.Alert("Se ha eliminadó el movimiento permanente")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditarMovtoPermanente_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim gvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero()
|
||||
Dim cveConcepto As Integer = gvRow.DataKey("CveConcepto").ToEntero()
|
||||
Dim cvePersonal As Integer = gvRow.DataKey("CvePersonal").ToEntero()
|
||||
Dim CveCuenta As Integer = gvRow.DataKey("CveCuenta").ToEntero()
|
||||
Dim IdCtaContable As Integer = gvRow.DataKey("IdCtaContable").ToEntero()
|
||||
Dim descripcion As String = gvRow.DataKey("Descripcion")
|
||||
Dim tipoDescuento As Integer = gvRow.DataKey("TipoDescuento").ToEntero()
|
||||
Dim valor As Double = gvRow.DataKey("Valor").ToDouble()
|
||||
Dim vecesAplicar As Integer = gvRow.DataKey("VecesAplicar").ToEntero()
|
||||
Dim montoLimite As Decimal = gvRow.DataKey("MontoLimite").ToDecimal()
|
||||
Dim fechaInicioAplicacion As DateTime = gvRow.DataKey("FechaInicioAplicacion").ToDate()
|
||||
Dim estatus As Boolean = gvRow.DataKey("Estatus") = "1" OrElse gvRow.DataKey("Estatus").ToUpper() = "TRUE"
|
||||
Dim fechaRegistro As DateTime = gvRow.DataKey("FechaRegistro").ToDateTime()
|
||||
Dim tipo As String = "P"
|
||||
Dim drow As DataRow = dtNomConceptos.FiltroPrimero(String.Format("CveConcepto ='{0}'", cveConcepto))
|
||||
|
||||
If drow IsNot Nothing Then
|
||||
tipo = drow("Tipo").ToString()
|
||||
DdlTipo.SelectedValueExist(tipo)
|
||||
DdlTipo_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
CargaConcepto()
|
||||
DdlConcepto.SelectedValueExist(cveConcepto)
|
||||
TxtDescripcion.Text = descripcion.ToString()
|
||||
DdlTipoDescto.SelectedValueExist(tipoDescuento.ToString())
|
||||
DdlTipoDescto_SelectedIndexChanged(Nothing, Nothing)
|
||||
TxtValor.Text = valor.ToString()
|
||||
TxtVecesAplicar.Text = vecesAplicar.ToString()
|
||||
TxtMontoLimite.Text = montoLimite.ToString()
|
||||
TxtFechaAplicacion.Text = $"{fechaInicioAplicacion}"
|
||||
DdlCtaContable.SelectedValueExist("-1")
|
||||
|
||||
If DdlCtaContable.DataValueField = "Id" Then
|
||||
DdlCtaContable.SelectedValueExist(IdCtaContable)
|
||||
Else
|
||||
DdlCtaContable.SelectedValueExist(CveCuenta)
|
||||
End If
|
||||
|
||||
ChkEstatus.Checked = estatus
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal()")
|
||||
pnlAddupMovto.Visible = True
|
||||
LnkAddMovto.Visible = False
|
||||
LnkUpMovto.Visible = True
|
||||
UpMovtosPermanentesModal.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "incapacidad"
|
||||
Private Property CcvePersonalIncapacidad As Integer
|
||||
Get
|
||||
Return If((ViewState("CcvePersonalIncapacidad") Is Nothing), 0, Convert.ToInt32(ViewState("CcvePersonalIncapacidad")))
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
ViewState("CcvePersonalIncapacidad") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub CargaPersonalIncapacidad()
|
||||
LimpiaPersonalIncapacidad()
|
||||
LnkAgregarIncapacidad.Visible = False
|
||||
LnkActualizarIncapacidad.Visible = False
|
||||
CcvePersonalIncapacidad = 0
|
||||
|
||||
Using ObjPers As ClsNominas = New ClsNominas()
|
||||
ObjPers.PersonalIncapacidadGet(-1, CvePersonal, UsuarioActual.CveEmpresa)
|
||||
GVNom_PersonalIncapacidad.DataSource = ObjPers.DtResultados
|
||||
End Using
|
||||
|
||||
GVNom_PersonalIncapacidad.DataBind()
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LimpiaPersonalIncapacidad()
|
||||
TxtSRINCfolio.Text = ""
|
||||
TxtSRINCfechaInicio.Text = ""
|
||||
TxtSRINCdiasAutorizados.Text = ""
|
||||
DdlSRINCcveTipodeIncidencia.SelectedValue = "-1"
|
||||
DdlSRINCcveRamoSeguro.SelectedValue = "-1"
|
||||
DdlSRINCcveTipoRiesgo.SelectedValue = "-1"
|
||||
TxtSRINCporcentajedeIncapacidad.Text = "100"
|
||||
DdlSRINCcveSecuelaConsecuencia.SelectedValue = "-1"
|
||||
DdlSRINCcveControlIncapacidad.SelectedValue = "-1"
|
||||
TxtSRINCdescripcion.Text = ""
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPersonalIncapacidad_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
LimpiaPersonalIncapacidad()
|
||||
Dim gvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
CcvePersonalIncapacidad = gvRow.DataKey("CvePersonalIncapacidad").ToEntero()
|
||||
Dim cvePersonal As Integer = gvRow.DataKey("CvePersonal").ToEntero()
|
||||
Dim folio As String = gvRow.DataKey("Folio")
|
||||
Dim fechaInicio As DateTime = gvRow.DataKey("FechaInicio").ToDateTime()
|
||||
Dim diasAutorizados As Integer = gvRow.DataKey("DiasAutorizados").ToEntero()
|
||||
Dim diasPagoEmpresa As Integer = gvRow.DataKey("DiasPagoEmpresa").ToEntero()
|
||||
Dim cveTipodeIncidencia As Integer = gvRow.DataKey("CveTipodeIncidencia").ToEntero()
|
||||
Dim cveRamoSeguro As Integer = gvRow.DataKey("CveRamoSeguro").ToEntero()
|
||||
Dim cveTipoRiesgo As Integer = gvRow.DataKey("CveTipoRiesgo").ToEntero()
|
||||
Dim porcentajedeIncapacidad As Integer = gvRow.DataKey("PorcentajedeIncapacidad").ToEntero()
|
||||
Dim cveSecuelaConsecuencia As Integer = gvRow.DataKey("CveSecuelaConsecuencia").ToEntero()
|
||||
Dim cveControlIncapacidad As Integer = gvRow.DataKey("CveControlIncapacidad").ToEntero()
|
||||
Dim descripcion As String = gvRow.DataKey("Descripcion")
|
||||
TxtSRINCfolio.Text = folio.ToString()
|
||||
TxtSRINCfechaInicio.Text = $"{fechaInicio}"
|
||||
TxtSRINCdiasAutorizados.Text = diasAutorizados.ToString()
|
||||
TxtDiasPagoEmpresa.Text = diasPagoEmpresa.ToString()
|
||||
DdlSRINCcveTipodeIncidencia.SelectedValueExist(cveTipodeIncidencia.ToString())
|
||||
DdlSRINCcveRamoSeguro.SelectedValueExist(cveRamoSeguro.ToString())
|
||||
DdlSRINCcveTipoRiesgo.SelectedValueExist(cveTipoRiesgo.ToString())
|
||||
TxtSRINCporcentajedeIncapacidad.Text = porcentajedeIncapacidad.ToString()
|
||||
DdlSRINCcveSecuelaConsecuencia.SelectedValueExist(cveSecuelaConsecuencia.ToString())
|
||||
DdlSRINCcveControlIncapacidad.SelectedValueExist(cveControlIncapacidad.ToString())
|
||||
TxtSRINCdescripcion.Text = descripcion.ToString()
|
||||
LnkAgregarIncapacidad.Visible = False
|
||||
LnkActualizarIncapacidad.Visible = True
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal()")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkshowaaddIncapacidad_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
LimpiaPersonalIncapacidad()
|
||||
LnkAgregarIncapacidad.Visible = True
|
||||
LnkActualizarIncapacidad.Visible = False
|
||||
CcvePersonalIncapacidad = 0
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal()")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarIncapacidad_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim folio As String = TxtSRINCfolio.Text
|
||||
Dim fechaInicio As DateTime = TxtSRINCfechaInicio.Text.ToDateTime()
|
||||
Dim diasAutorizados As Integer = TxtSRINCdiasAutorizados.Text.ToEntero()
|
||||
Dim DiasPagoEmpresa As Integer = TxtDiasPagoEmpresa.Text.ToEntero()
|
||||
Dim cveTipodeIncidencia As Integer = DdlSRINCcveTipodeIncidencia.Text.ToEntero()
|
||||
Dim cveRamoSeguro As Integer = DdlSRINCcveRamoSeguro.Text.ToEntero()
|
||||
Dim cveTipoRiesgo As Integer = DdlSRINCcveTipoRiesgo.Text.ToEntero()
|
||||
Dim porcentajedeIncapacidad As Integer = TxtSRINCporcentajedeIncapacidad.Text.ToEntero()
|
||||
Dim cveSecuelaConsecuencia As Integer = DdlSRINCcveSecuelaConsecuencia.Text.ToEntero()
|
||||
Dim cveControlIncapacidad As Integer = DdlSRINCcveControlIncapacidad.Text.ToEntero()
|
||||
Dim descripcion As String = TxtSRINCdescripcion.Text
|
||||
Dim Continuar As Boolean
|
||||
|
||||
Using ObjPers As ClsNominas = New ClsNominas()
|
||||
Continuar = ObjPers.PersonalIncapacidadAdd(UsuarioActual.CveUsuario, CvePersonal, folio, fechaInicio, diasAutorizados, cveTipodeIncidencia, cveRamoSeguro, cveTipoRiesgo, porcentajedeIncapacidad, cveSecuelaConsecuencia, cveControlIncapacidad, descripcion, DiasPagoEmpresa)
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
CargaPersonalIncapacidad()
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
Me.Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion)
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkActualizarIncapacidad_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim folio As String = TxtSRINCfolio.Text
|
||||
Dim fechaInicio As DateTime = TxtSRINCfechaInicio.Text.ToDateTime()
|
||||
Dim diasAutorizados As Integer = TxtSRINCdiasAutorizados.Text.ToEntero()
|
||||
Dim DiasPagoEmpresa As Integer = TxtDiasPagoEmpresa.Text.ToEntero()
|
||||
Dim cveTipodeIncidencia As Integer = DdlSRINCcveTipodeIncidencia.Text.ToEntero()
|
||||
Dim cveRamoSeguro As Integer = DdlSRINCcveRamoSeguro.Text.ToEntero()
|
||||
Dim cveTipoRiesgo As Integer = DdlSRINCcveTipoRiesgo.Text.ToEntero()
|
||||
Dim porcentajedeIncapacidad As Integer = TxtSRINCporcentajedeIncapacidad.Text.ToEntero()
|
||||
Dim cveSecuelaConsecuencia As Integer = DdlSRINCcveSecuelaConsecuencia.Text.ToEntero()
|
||||
Dim cveControlIncapacidad As Integer = DdlSRINCcveControlIncapacidad.Text.ToEntero()
|
||||
Dim descripcion As String = TxtSRINCdescripcion.Text
|
||||
Dim Continuar As Boolean
|
||||
|
||||
Using ObjPers As ClsNominas = New ClsNominas()
|
||||
Continuar = ObjPers.PersonalIncapacidadUp(UsuarioActual.CveUsuario, CcvePersonalIncapacidad, folio, fechaInicio, diasAutorizados, cveTipodeIncidencia, cveRamoSeguro, cveTipoRiesgo, porcentajedeIncapacidad, cveSecuelaConsecuencia, cveControlIncapacidad, descripcion, DiasPagoEmpresa)
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
CargaPersonalIncapacidad()
|
||||
UpsrIncapacidadpersonal.Update()
|
||||
Me.Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion)
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkActivar_Click(sender As Object, e As EventArgs)
|
||||
LblEstatus.Text = "Activar personal"
|
||||
LblFechaEstatus.Text = "Fecha ingreso ó reingreso"
|
||||
TxtFechaEstatus.Text = ""
|
||||
RegistraScript("$('#ModalUpEstatus').modal();")
|
||||
upPersonEstatus.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDesactivar_Click(sender As Object, e As EventArgs)
|
||||
LblEstatus.Text = "Desactivar personal"
|
||||
LblFechaEstatus.Text = "Fecha baja"
|
||||
TxtFechaEstatus.Text = ""
|
||||
RegistraScript("$('#ModalUpEstatus').modal();")
|
||||
upPersonEstatus.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkUpEstatus_Click(sender As Object, e As EventArgs)
|
||||
Dim fini As DateTime
|
||||
Dim ffin As DateTime
|
||||
Dim fecha As DateTime = TxtFechaEstatus.Text.ToDateTime()
|
||||
|
||||
If GvPersonalAltas.Rows.Count > 0 Then
|
||||
Dim gvrow As GridViewRow = GvPersonalAltas.Rows(0)
|
||||
fini = gvrow.DataKey("FechaInicio").ToDateTime()
|
||||
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
||||
|
||||
End If
|
||||
Dim estatus = -1
|
||||
Dim continuar = False
|
||||
|
||||
|
||||
If (LnkActivar.Visible) Then
|
||||
estatus = 1
|
||||
If ffin >= fecha Then
|
||||
continuar = False
|
||||
Alert(String.Format("la '{0}' debe ser mayor a {1:dd/MM/yyyy}", LblFechaEstatus.Text, ffin), TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
continuar = True
|
||||
|
||||
End If
|
||||
Else
|
||||
|
||||
estatus = 2
|
||||
If fini >= fecha Then
|
||||
continuar = False
|
||||
Alert(String.Format("la '{0}' debe ser mayor a {1:dd/MM/yyyy}", LblFechaEstatus.Text, fini), TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
continuar = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If continuar Then
|
||||
|
||||
RegistraScript("$('#ModalUpEstatus').modal('hide');")
|
||||
Alert("Se guardo correctamente", TipoMensaje.MsgInformacion)
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user