Ruta personalizada por Empresa

This commit is contained in:
2021-07-31 09:54:05 -07:00
parent d59dc01317
commit fbde0a2e58
79 changed files with 2710 additions and 2685 deletions

View File

@@ -327,9 +327,9 @@ Partial Class RH_CatCursos
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/CursosInvitados.rdlc"
Dim Archivo As String = $"{UsuarioActual.Empresa.Ruta}Formatos/CursosInvitados.rdlc"
If Not File.Exists($"{Extensiones.DirectorioBaseEmpresas}/{Archivo}") Then
If Not File.Exists(Archivo) Then
Archivo = "Empresas/Grales/Formatos/CursosInvitados.rdlc"
End If

View File

@@ -467,7 +467,7 @@ Partial Class RH_MiPerfil
puestoProp = ""
End If
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.URL) Then
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{ObjPersonal.URL}"
End If

View File

@@ -1470,17 +1470,17 @@ Partial Class RH_Personal
End If
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".jpg") Then
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.jpg", UsuarioActual.CveEmpresa, CvePersonal)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
ImgPersonal.ImageUrl = logouri
ElseIf File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".png") Then
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
ImgPersonal.ImageUrl = logouri
ElseIf File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".bmp") Then
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
@@ -1689,9 +1689,9 @@ Partial Class RH_Personal
Dim ObjCuentasDeposito As New ClsGenerales(ObjPersonal.IniciaTransacSQL())
Dim ObjAF As New ClsAF(ObjPersonal.IniciaTransacSQL())
Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\RH\" & ViewState("Archivo").ToString())
Dim Extension As String = Path.GetExtension(UsuarioActual.Empresa.Ruta & "Temp\RH\" & ViewState("Archivo").ToString())
Dim URL As String = CvePersonal & Extension
Dim Ruta = String.Format("{0}Empresas\{1}\Temp\RH\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ViewState("Archivo").ToString())
Dim Ruta = String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, ViewState("Archivo").ToString())
Dim Archivo As New System.IO.FileInfo(Ruta)
@@ -3405,7 +3405,7 @@ Partial Class RH_Personal
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.URL & ".png") Then
params.Add(New ReportParameter("LogoUri", "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL & ".png"))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -3507,7 +3507,7 @@ Partial Class RH_Personal
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.URL & ".png") Then
params.Add(New ReportParameter("LogoUri", "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL & ".png"))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -3553,7 +3553,7 @@ Partial Class RH_Personal
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -5348,9 +5348,9 @@ Partial Class RH_Personal
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
filemove = fileItem.filename
Dim yaExistente As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.jpg", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CvePersonal)
Dim yaExistentePNG As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.png", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CvePersonal)
Dim yaExistenteBMP As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.bmp", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CvePersonal)
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)
@@ -5365,7 +5365,7 @@ Partial Class RH_Personal
End If
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
Next
If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & "." & FileExtension) Then
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)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now)
ImgPersonal.ImageUrl = logouri
@@ -5596,7 +5596,7 @@ Partial Class RH_Personal
Protected Sub GenerarPDFConsumo(Optional Formato As String = "PDF")
Dim CodigoP As String = ""
Dim NombreCompletoP As String = ""
Dim Ruta As String = String.Format("{0}Empresas/{1}/", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
Dim Ruta As String = UsuarioActual.Empresa.Ruta
Dim RutaPDF As String = String.Format("{0}/Formatos/RepConsumoPersonal.rdlc", Ruta)
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepConsumoPersonal.rdlc"

View File

@@ -66,7 +66,7 @@ Partial Class RH_RepBuzonCalidad
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
Else
'
If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("CvePersonal") & ".png") Then
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & e.Row.DBCampo("CvePersonal") & ".png") Then
e.Row.FCImage("ImgPersonal").ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & e.Row.DBCampo("CvePersonal") & ".png"
End If
e.Row.Cells(0).Visible = False