This commit is contained in:
@@ -450,13 +450,22 @@ Partial Class RH_MiPerfil
|
||||
|
||||
Dim jefeCve As Integer = If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString = "0", "-1", ObjPersonal.CvePersonalPadre.ToString))
|
||||
Dim expressionJefe As String = String.Format("CvePersonal = {0}", jefeCve)
|
||||
Dim resultad As DataRow() = DTOrganigrama.Select(expressionJefe)
|
||||
JefeInmediato = resultad(0).Item("NombreCompleto")
|
||||
Dim resultad As DataRow = DTOrganigrama.FiltroPrimero(expressionJefe)
|
||||
If (Not IsNothing(resultad)) Then
|
||||
JefeInmediato = resultad.Item("NombreCompleto").ToString()
|
||||
Else
|
||||
JefeInmediato = ""
|
||||
End If
|
||||
|
||||
Dim puestosAux As DataTable = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
|
||||
Dim expressionPuesto As String = String.Format("CvePuesto = {0}", ObjPersonal.CvePuesto.ToString)
|
||||
Dim resultadoPuesto As DataRow() = puestosAux.Select(expressionPuesto)
|
||||
puestoProp = resultad(0).Item("Puesto")
|
||||
Dim resultadoPuesto As DataRow = puestosAux.FiltroPrimero(expressionPuesto)
|
||||
|
||||
If (Not IsNothing(resultad)) Then
|
||||
puestoProp = resultadoPuesto.Item("Puesto")
|
||||
Else
|
||||
puestoProp = ""
|
||||
End If
|
||||
|
||||
If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
|
||||
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{ObjPersonal.URL}"
|
||||
@@ -975,7 +984,7 @@ Partial Class RH_MiPerfil
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\RH_FormatoVacaciones.docx", UsuarioActual.Empresa.Ruta)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
|
||||
Dim Codigo As String = TxtCodigo.Text
|
||||
@@ -983,8 +992,9 @@ Partial Class RH_MiPerfil
|
||||
Dim JefeInmediatoAux As String = JefeInmediato
|
||||
Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaInicio").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim MotivoPermiso As String = GvRow.DataKey("Descripcion")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim HorasPermiso As String = "" 'String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
|
||||
Dim MotivoPermiso As String = String.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"))
|
||||
If File.Exists(RutaFormato) Then
|
||||
|
||||
Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
|
||||
@@ -999,6 +1009,7 @@ Partial Class RH_MiPerfil
|
||||
ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
|
||||
ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{HorasPermiso}", HorasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags)
|
||||
@@ -1014,7 +1025,8 @@ Partial Class RH_MiPerfil
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
|
||||
Response.BinaryWrite(bytesInStream)
|
||||
Response.End()
|
||||
|
||||
Else
|
||||
Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user