")
Cuerpo.AppendLine($"| Datos del Candidato |
")
Cuerpo.AppendLine($"| Puesto: | {IIf(ddlPuesto.SelectedIndex > 0, ddlPuesto.SelectedItem.Text, "") } |
")
Cuerpo.AppendLine($"| Ruta/Servicio: | { DdlRuta.SelectedItem.Text } |
")
Cuerpo.AppendLine($"| Fecha de ingreso: | {TxtFechaInicio.Text} |
")
Cuerpo.AppendLine($"| Nombre: | { NombreCompleto } |
")
Cuerpo.AppendLine($"| Fecha y Lugar de Nacimiento: | {TxtFechaN4.Text} {TxtLugarnacimiento4.Text} |
")
Cuerpo.AppendLine($"| Numero IMSS: | { TxtSeguroSocial4.Text } |
")
Cuerpo.AppendLine($"| Numero Infonavit: | { If(TxtInfonavitNo.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfonavitNo.Text) } |
")
Cuerpo.AppendLine($"| Sexo: | { IIf(DdlSexo.SelectedValue = "1", "Masculino", "Femenino") } |
")
Cuerpo.AppendLine($"| R.F.C.: | { TxtRFC4.Text } |
")
Cuerpo.AppendLine($"| CURP: | { TxtCurp4.Text } |
")
Cuerpo.AppendLine($"| Nombre del Padre: | { Padre } |
")
Cuerpo.AppendLine($"| Nombre de la Madre: | { Madre } |
")
Cuerpo.AppendLine($"| Dirección: | { TxtDomicilio4.Text } |
")
Cuerpo.AppendLine($"| Escolaridad: | { IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") } |
")
Cuerpo.AppendLine($"| Telefono: | { TxtCell4.Text},{TxtTelLocal4.Text} |
")
Cuerpo.AppendLine($"| Tel en Caso de Emergencia: | { TxtContactoEmergencia4.Text } |
")
Cuerpo.AppendLine($"| Correo: | { TxtEmail4.Text } |
")
Cuerpo.AppendLine("
")
correo.SendMail(EmpresaNotificaciones, CorreoNominista, "Notificacion por Alta de Nomina: " & NombreCompleto, Cuerpo.ToString)
End Sub
Protected Sub LnkPruebaEnviarCorreo_Click(sender As Object, e As EventArgs)
EviarCorreoNomista()
End Sub
#End Region
#Region "PASO 1 - HOJA RETENCION INFONAVIT"
Protected Sub CargaGVHojaRetencion()
Dim dt As New DataTable()
dt.Columns.Add("Documentacion")
dt.Columns.Add("Estatus")
Dim row As DataRow = dt.NewRow()
row("Documentacion") = "Hoja de Retención"
row("Estatus") = "False"
dt.Rows.Add(row)
GVRetencionInfonavit.DataSource = dt
GVRetencionInfonavit.DataBind()
UPRetencionInfonavit.Update()
End Sub
Protected Sub ImgUploadRetencionInfonavit_Click(sender As Object, e As EventArgs)
AplicaDocumentacion = False
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim chkEstatus As CheckBox
Documentacion = "Hoja de Retencion"
chkEstatus = GvRow.FCCheckBox("chkEstatus")
If chkEstatus.Checked Then
Estatus = 1
Else
Estatus = 0
End If
LtlModalUploadTitulo.Text = "Subir " & Documentacion
UpModalTitleUploadDocumento.Update()
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
End Sub
Private Function DescargarArchivo(NombreDocumento As String) As String
Dim path As String = UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\"
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path)
Dim Directorio As String = String.Format("{0}{1}{2}\", UsuarioActual.Empresa.Ruta, "Personal\", CvePersonal)
If Directory.Exists(Directorio) Then
Dim fileEntries As String() = Directory.GetFiles(Directorio)
For Each fileName As String In fileEntries
Dim fileActual As System.IO.FileInfo = New System.IO.FileInfo(fileName)
Dim separado As Char() = ".".ToCharArray
Dim array() As String = fileActual.Name.Split(separado)
Dim nombreSinExtencion As String = fileActual.Name.Split(".".ToCharArray)(0)
If NombreDocumento = nombreSinExtencion Then
file = fileActual
End If
Next
If file.Exists Then
Return UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & file.Name
End If
End If
Return ""
End Function
Protected Sub GVRetencionInfonavit_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
If CvePersonal > 0 Then
Dim RutaArchivo As String = DescargarArchivo("Hoja de Retencion")
If RutaArchivo.Trim.Length > 0 Then
If File.Exists(RutaArchivo) Then
Dim file As System.IO.FileInfo = New System.IO.FileInfo(RutaArchivo)
Dim RutaDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & file.Name
If file.Extension.Length > 0 Then
ImgDownLoad.Text = String.Format("