-- cambios de seccionesAlmace,Serie,Lote,Caducidad
This commit is contained in:
@@ -211,7 +211,7 @@ Partial Class Contratos_CatContratosPlantillas
|
||||
Return nombreArchivoFormateado
|
||||
End Function
|
||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargar.Click
|
||||
Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\Grales\Formatos\Plantilla.docx"
|
||||
Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\Grales\Formatos\Plantilla.docx"
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
@@ -1231,10 +1231,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(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
End If
|
||||
Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
|
||||
'ViewState("extencion") = FileExtension
|
||||
'ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", ViewState("FName").ToString)
|
||||
@@ -1368,10 +1368,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(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
End If
|
||||
Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
|
||||
Try
|
||||
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
|
||||
@@ -3169,7 +3169,7 @@ Partial Class Contratos_Default
|
||||
|
||||
#Region "SUBIR EXCEL"
|
||||
Public Sub DescargarFormato()
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
@@ -3417,7 +3417,7 @@ 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 Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
@@ -3741,7 +3741,7 @@ Partial Class Contratos_Default
|
||||
#Region " IMPRIMIR DOCUMENTO - SABE "
|
||||
Public Sub DescarFormato(documento As String)
|
||||
|
||||
Dim PathRoot As String = Server.MapPath("/")
|
||||
Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
|
||||
Dim PathSource As String
|
||||
Dim pathDesti As String
|
||||
|
||||
|
||||
@@ -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(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
End If
|
||||
Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\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(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
|
||||
Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
|
||||
End If
|
||||
Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
|
||||
Try
|
||||
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
|
||||
@@ -698,10 +698,10 @@ Partial Class Contratos_Default
|
||||
|
||||
UpGral.Update()
|
||||
ObjContratos.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "INICIO DE PAGINA"
|
||||
Protected Sub DdlTipoContrato_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -792,33 +792,33 @@ Partial Class Contratos_Default
|
||||
|
||||
UpGral.Update()
|
||||
UPTipo.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "TAB INFORMACION GENERAL"
|
||||
|
||||
'Protected Sub CargarArchivo(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")
|
||||
' End If
|
||||
' Dim UploadFolder As String = Request.PhysicalApplicationPath + "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
|
||||
' System.IO.File.Delete(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
|
||||
' End If
|
||||
|
||||
' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
|
||||
' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
|
||||
' Session("FileExtension") = Extension
|
||||
' Session("FileFolder") = UploadFolder
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub CargarArchivo(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
|
||||
' If AFU.HasFile Then
|
||||
' 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 = 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
|
||||
' System.IO.File.Delete(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
|
||||
' End If
|
||||
|
||||
' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
|
||||
' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
|
||||
' Session("FileExtension") = Extension
|
||||
' Session("FileFolder") = UploadFolder
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
#Region "COMBOS - INFO GENERAL"
|
||||
Private Sub CargaProyecto()
|
||||
If UsuarioActual.Empresa.GralSoloProyecto Then
|
||||
@@ -1946,7 +1946,7 @@ Partial Class Contratos_Default
|
||||
#Region "SUBIR EXCEL"
|
||||
|
||||
Public Sub DescargarFormato()
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
@@ -2143,7 +2143,7 @@ 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 Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
|
||||
@@ -442,7 +442,7 @@ Partial Class Contratos_ContratosSecciones
|
||||
|
||||
|
||||
|
||||
dbLayer = Mapa.AddLayer(AppDomain.CurrentDomain.BaseDirectory & "GIS\Carretera.tab")
|
||||
dbLayer = Mapa.AddLayer(ModExtensiones.DirectorioBaseEmpresas & "GIS\Carretera.tab")
|
||||
If dbLayer IsNot Nothing AndAlso DtDatos IsNot Nothing Then
|
||||
|
||||
If (Not dbLayer.AddRelate("ID_GIS", DtDatos, "ID_GIS")) Then
|
||||
|
||||
Reference in New Issue
Block a user