<%--
--%>
-
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 09e4f08bb..da16a8d97 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -6507,12 +6507,82 @@ Partial Class RH_Personal
+ Property CvePersonalAltas As Integer
+ Get
+ If ViewState("CvePersonalAltas") Is Nothing Then
+ Return 0
+ Else
+ Return DirectCast(ViewState("CvePersonalAltas"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CvePersonalAltas") = value
+ End Set
+ End Property
Protected Sub LnkUpAltass_Click(sender As Object, e As EventArgs)
-
+ Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ CvePersonalAltas = GvRow.DataKey("CvePersonalAltas").ToEntero()
+ TxtFechaInicioUA.Text = String.Format("{0:dd/MM/yyyy}", GvRow.DataKey("FechaInicio").ToDateTime())
+ Dim fechafin As DateTime = GvRow.DataKey("FechaFin").ToDateTime()
+ If fechafin.Year < 1900 Then
+ TxtFechaFinUA.Text = ""
+ Else
+ TxtFechaFinUA.Text = String.Format("{0:dd/MM/yyyy}", fechafin)
+ End If
+ UpAltasUpdate.Update()
+ RegistraScript("$('#ModalUpAltas').modal();")
End Sub
Protected Sub LnkDAltas_Click(sender As Object, e As EventArgs)
+ Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ CvePersonalAltas = GvRow.DataKey("CvePersonalAltas").ToEntero()
+ Dim strquery As String = String.Format("DELETE [RH_PersonalAltas] WHERE CvePersonalAltas ={0} AND [CvePersonal] ={1}", CvePersonalAltas, CvePersonal)
+ Using objbase As New ClsClaseBase
+ If (objbase.runQuerystr(strquery)) Then
+ Using objrh As New ClsRH()
+ If objrh.GetPersonalAltas(CvePersonal) Then
+ GvPersonalAltas.DataSource = objrh.DtResultados
+ GvPersonalAltas.DataBind()
+ UpDatos.Update()
+ End If
+ End Using
+ Alert("Alta eliminada")
+ End If
+ End Using
+ End Sub
+
+ Protected Sub LnkUpAltas_Click(sender As Object, e As EventArgs)
+
+ Dim strfin As String = ""
+ Dim fechafin As DateTime = TxtFechaFinUA.Text.ToDateTime()
+ If fechafin.Year < 1900 Then
+ strfin = ",[FechaFin]=null"
+ Else
+ strfin = String.Format(",[FechaFin]='{0:yyyy-MM-dd}'", fechafin)
+
+ End If
+ Dim strquery As String = String.Format("UPDATE [RH_PersonalAltas] SET [FechaInicio]='{2:yyyy-MM-dd}' {3} WHERE CvePersonalAltas ={0} AND [CvePersonal] ={1}", CvePersonalAltas, CvePersonal, TxtFechaInicioUA.Text.ToDateTime(), strfin)
+ Using objbase As New ClsClaseBase
+ If (objbase.runQuerystr(strquery)) Then
+ Using objrh As New ClsRH()
+ If objrh.GetPersonalAltas(CvePersonal) Then
+ GvPersonalAltas.DataSource = objrh.DtResultados
+ GvPersonalAltas.DataBind()
+ UpDatos.Update()
+ End If
+ End Using
+ Alert("Alta actualizada")
+ End If
+ End Using
+ End Sub
+
+ Protected Sub GvPersonalAltas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ e.Row.FCLinkButton("LnkUpAltass").Visible = UsuarioActual.TienePermisoProceso(327)
+ e.Row.FCLinkButton("LnkDAltas").Visible = e.Row.FCLinkButton("LnkUpAltass").Visible
+ End If
End Sub
End Class
+
diff --git a/vwd.webinfo b/vwd.webinfo
index aa2858f6e..a4b7678ae 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -266,6 +266,12 @@
+
+
+
+
+
+