Transportes Mejoras
This commit is contained in:
@@ -107,6 +107,32 @@ Partial Class PopUpVerFactura
|
||||
ImprimeFormatoCartaPorteTimbrado(Request("CVETIMBRE").ToString.ToEntero)
|
||||
End If
|
||||
|
||||
If Request("ArchivoContrato") IsNot Nothing AndAlso Request("ArchivoContrato") IsNot Nothing Then
|
||||
|
||||
Dim ArchivoContrato As String = Decripta(Request("ArchivoContrato"))
|
||||
Dim File As New FileInfo(ArchivoContrato)
|
||||
|
||||
If File.Exists Then 'set appropriate headers
|
||||
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", "inline; filename=" & $"{File.Name}")
|
||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||
'Response.ContentType = "text/plain"
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.Flush()
|
||||
' Response.TransmitFile(File.FullName)
|
||||
Response.WriteFile(File.FullName)
|
||||
Response.End()
|
||||
|
||||
Else
|
||||
|
||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Request("RFC") IsNot Nothing AndAlso Request("File") IsNot Nothing Then
|
||||
Dim Path As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("File"))
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
|
||||
Reference in New Issue
Block a user