Ruta personalizada por Empresa
This commit is contained in:
@@ -1304,10 +1304,10 @@ Partial Class Contratos_Default
|
||||
'Renombrar archivo
|
||||
If ViewState("extencion") IsNot Nothing Then
|
||||
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "Contratos") Then
|
||||
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Contratos")
|
||||
End If
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = UsuarioActual.Empresa.Ruta & "Contratos\"
|
||||
|
||||
'ViewState("extencion") = FileExtension
|
||||
'ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", ViewState("FName").ToString)
|
||||
@@ -1420,10 +1420,10 @@ Partial Class Contratos_Default
|
||||
If ViewState("extencion") IsNot Nothing Then
|
||||
|
||||
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "Contratos") Then
|
||||
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Contratos")
|
||||
End If
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = UsuarioActual.Empresa.Ruta & "Contratos\"
|
||||
|
||||
Try
|
||||
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
|
||||
@@ -3554,8 +3554,8 @@ Partial Class Contratos_Default
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -597,10 +597,10 @@ Partial Class Contratos_Default
|
||||
'Renombrar archivo
|
||||
If ViewState("extencion") IsNot Nothing Then
|
||||
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "Contratos") Then
|
||||
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Contratos")
|
||||
End If
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = UsuarioActual.Empresa.Ruta & "Contratos\"
|
||||
|
||||
'ViewState("extencion") = FileExtension
|
||||
'ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", ViewState("FName").ToString)
|
||||
@@ -643,10 +643,10 @@ Partial Class Contratos_Default
|
||||
If ViewState("extencion") IsNot Nothing Then
|
||||
|
||||
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "Contratos") Then
|
||||
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Contratos")
|
||||
End If
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = UsuarioActual.Empresa.Ruta & "Contratos\"
|
||||
|
||||
Try
|
||||
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user