Simplificar referencias a logos en RDLC y más limpieza de código
This commit is contained in:
@@ -324,7 +324,7 @@ Partial Class RH_CatCursos
|
||||
|
||||
If DatosAsistencia.Rows.Count > 0 Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
Dim Archivo As String = $"{UsuarioActual.Empresa.Ruta}Formatos/CursosInvitados.rdlc"
|
||||
|
||||
@@ -678,7 +678,7 @@ Partial Class RH_CatPersonal
|
||||
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
|
||||
@@ -651,21 +651,15 @@ Partial Class RH_MiPerfil
|
||||
If RBLTipoGastos.SelectedValue = "1" Then
|
||||
|
||||
If DTGastosSinComp.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString))
|
||||
params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("pImg", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
|
||||
Else
|
||||
@@ -688,20 +682,15 @@ Partial Class RH_MiPerfil
|
||||
Row("SerieFolio") = ""
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("pImg", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
|
||||
Else
|
||||
@@ -1755,7 +1744,7 @@ end_of_for:
|
||||
params.Add(New ReportParameter("TotalADepositar", If(ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar").ToDouble() > 0, ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar"), "0").ToString()))
|
||||
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
If (Imagen.Exists) Then
|
||||
|
||||
|
||||
@@ -3736,7 +3736,7 @@ Partial Class RH_Personal
|
||||
params.Add(New ReportParameter("LogoUri", ""))
|
||||
End If
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
@@ -3834,7 +3834,7 @@ Partial Class RH_Personal
|
||||
params.Add(New ReportParameter("LogoUri", ""))
|
||||
End If
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
@@ -3886,21 +3886,15 @@ Partial Class RH_Personal
|
||||
If RBLTipoGastos.SelectedValue = "1" Then
|
||||
|
||||
If DTGastosSinComp.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
|
||||
params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString()))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("pImg", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
|
||||
Else
|
||||
@@ -3924,19 +3918,14 @@ Partial Class RH_Personal
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("pImg", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
|
||||
Else
|
||||
@@ -6026,7 +6015,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
Dim params As New List(Of ReportParameter)()
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -6389,7 +6378,7 @@ Partial Class RH_Personal
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\RepResguardosAF.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim dtVC As DataTable = Nothing
|
||||
|
||||
@@ -157,7 +157,7 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
||||
'"Empresas/Grales/Formatos/ClienteHistorial.rdlc"
|
||||
If GVRegDatos.Rows.Count > 0 Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
@@ -245,7 +245,7 @@ Partial Class RH_RepPersonalInconsistencias
|
||||
Dim StrFiltro As New StringBuilder
|
||||
' StrFiltro.AppendFormat("<b>Agrupado por</b>: {0}", DdlGrupo.SelectedItem.Text)
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If txtFechaI.Text <> "" And rdlc = "RepPersonalInconsistenciasCU.rdlc" Then StrFiltro.AppendFormat(" <b>Fecha Inicio</b>: {0}", txtFechaI.Text)
|
||||
|
||||
@@ -87,7 +87,7 @@ Partial Class RH_RepUniformes
|
||||
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim Filtros As String = "<b>Filtros: </b> "
|
||||
|
||||
@@ -119,7 +119,7 @@ Partial Class RH_RepUniformesResguardo
|
||||
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim Filtros As String = "<b>Filtros: </b> "
|
||||
|
||||
@@ -711,7 +711,7 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
@params.Add(new ReportParameter("TotalADepositar", (ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar").ToDouble() > 0 ? ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar") : "0").ToString()));
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user