This commit is contained in:
@@ -1194,21 +1194,27 @@ Partial Class RH_CatPersonal
|
||||
) Then
|
||||
Dim filesgral As List(Of Archivo) = TxtFoto.getfiles().Archivos
|
||||
Dim filemove As String = ""
|
||||
For Each fileItem As Archivo In filesgral
|
||||
Dim extension = fileItem.Extension.Replace(".", "")
|
||||
If (extension.Contiene("jpg", "png", "bmp")) Then
|
||||
Dim dir As String = String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta)
|
||||
System.IO.Directory.CreateDirectory(dir)
|
||||
Dim file As String = String.Format("{0}{1}.{2}", dir, ObjPersonal.CvePersonal, extension)
|
||||
System.IO.File.Move(fileItem.FileUrl, file)
|
||||
End If
|
||||
If ObjPersonal.CvePersonal > 0 Then
|
||||
|
||||
Next
|
||||
For Each fileItem As Archivo In filesgral
|
||||
Dim extension = fileItem.Extension.Replace(".", "")
|
||||
If (extension.Contiene("jpg", "png", "bmp")) Then
|
||||
Dim dir As String = String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta)
|
||||
System.IO.Directory.CreateDirectory(dir)
|
||||
Dim file As String = String.Format("{0}{1}.{2}", dir, ObjPersonal.CvePersonal, extension)
|
||||
If (System.IO.File.Exists(file)) Then
|
||||
System.IO.File.Delete(file)
|
||||
End If
|
||||
System.IO.File.Move(fileItem.FileUrl, file)
|
||||
End If
|
||||
|
||||
Next
|
||||
Alert(String.Format("El empleado a sido agregado satisfactoriamente <a href=""/RH/Personal.aspx?CvePersonal={0}"">Ver empleado</a>", ObjPersonal.CvePersonal), TipoMensaje.ToastInformacion, "", 0)
|
||||
End If
|
||||
|
||||
ObjPersonal.AgroDepartamentoPersonalUp(UsuarioActual.CveEmpresa, DDlAgroDepartamento.SelectedValue.ToEntero(), ObjPersonal.CvePersonal, If(ChkCharolaForanea.Checked, 1, 0))
|
||||
|
||||
TxtFoto.Text = "[]"
|
||||
Alert(String.Format("El empleado a sido agregado satisfactoriamente <a href=""/RH/Personal.aspx?CvePersonal={0}"">Ver empleado</a>", ObjPersonal.CvePersonal), TipoMensaje.ToastInformacion, "", 0)
|
||||
continuar = True
|
||||
ISChange = True
|
||||
ObjPersonal.Commit()
|
||||
|
||||
Reference in New Issue
Block a user