This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-07-29 16:21:05 -07:00
parent 837d3201b0
commit 95db34a9ae
11 changed files with 1260 additions and 116 deletions

View File

@@ -1519,7 +1519,7 @@ Partial Class RH_Personal
Dim OcurrioError As Boolean = False
For Each Row As GridViewRow In GVAsistencia.Rows
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), DdlClienteAsistenciaC.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), -2, -2, Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(), Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -1908,6 +1908,14 @@ Partial Class RH_Personal
If Archivo.Exists Then
If Not IsNothing(ViewState("FilesMoveimgNew")) Then
Dim filemove As String = ViewState("FilesMoveimgNew").ToString()
If Not String.IsNullOrWhiteSpace(filemove) Then
filemove.FilesMove(ObjPersonal.CvePersonal.ToString(), String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
End If
End If
If File.Exists(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL)) Then
File.Delete(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL))
End If
@@ -5717,22 +5725,29 @@ Partial Class RH_Personal
Dim dir As String = String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta)
System.IO.Directory.CreateDirectory(dir)
Dim yaExistente As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim yaExistentePNG As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim yaExistenteBMP As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
If CvePersonal > 0 Then
Dim yaExistente As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim yaExistentePNG As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim yaExistenteBMP As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
If File.Exists(yaExistente) Then
File.Delete(yaExistente)
ElseIf File.Exists(yaExistentePNG) Then
File.Delete(yaExistentePNG)
ElseIf File.Exists(yaExistenteBMP) Then
File.Delete(yaExistenteBMP)
End If
If File.Exists(yaExistente) Then
File.Delete(yaExistente)
ElseIf File.Exists(yaExistentePNG) Then
File.Delete(yaExistentePNG)
ElseIf File.Exists(yaExistenteBMP) Then
File.Delete(yaExistenteBMP)
End If
If filemove <> "" Then
filemove.FilesMove(CvePersonal.ToString(), String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
If CvePersonal > 0 Then
filemove.FilesMove(CvePersonal.ToString(), String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
Else
ViewState("FilesMoveimgNew") = filemove
End If
End If
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
Next
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)