Ruta dinamica de carpeta "Empresas" asignar valor desde el web config

This commit is contained in:
2020-05-12 00:29:19 -07:00
parent 701eec057e
commit 4dd49e29f5
133 changed files with 3971 additions and 3886 deletions

View File

@@ -16,10 +16,10 @@ Partial Class CargarArchivo
Protected Sub AFU_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
If AFU.HasFile Then
If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
End If
Dim UploadFolder As String = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim UploadFolder As String = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then

View File

@@ -13,10 +13,10 @@ Partial Class CargarImagen
Protected Sub AFU_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
If AFU.HasFile Then
If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
End If
Dim UploadFolder As String = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim UploadFolder As String = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then

View File

@@ -105,7 +105,7 @@ Partial Class CatSucursales
e.Row.FCLiteral("LtlFecha").Text = Liga & e.Row.FCLiteral("LtlFecha").Text & "</a>"
e.Row.FCLiteral("LtlUsuario").Text = Liga & e.Row.FCLiteral("LtlUsuario").Text & "</a>"
If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & e.Row.DBCampo("FormatoFactura")) Then
If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & e.Row.DBCampo("FormatoFactura")) Then
e.Row.FCLiteral("LtlFormato").Text = "<a class=""Texto"" href=""/Empresas/" & UsuarioActual.CveEmpresa & "/Formatos/" & e.Row.DBCampo("FormatoFactura") & """>Ver</a>"
Else
e.Row.FCLiteral("LtlFormato").Text = "<a class=""Texto"" href=""javascript:AbrirVentana('/UploadFile.aspx?Tipo=FormatoFactura', 350, 110, 'N', 'CargarArchivo');"">Cargar Factura</a>"

View File

@@ -62,7 +62,7 @@ Partial Class Sucursal
Else
Matriz.Checked = False
End If
If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & DT.Rows(0)("FormatoFactura").ToString) Then
If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & DT.Rows(0)("FormatoFactura").ToString) Then
'DirectCast("HLVer", HtmlLink). = "<a class=""Texto"" href=""/Empresas/" & UsuarioActual.CveEmpresa & "/Formatos/" & e.Row.DBCampo("FormatoFactura") & """>Ver</a>"
End If