' 2026-06-26 Actualización de dependencia de tsZIP a tsZIP.NS
This commit is contained in:
31
Informes.vb
31
Informes.vb
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports tsWPF
|
||||
Imports tsZIP
|
||||
|
||||
|
||||
Public Class Informes
|
||||
@@ -210,7 +211,7 @@ Public Class Informes
|
||||
Dim sContenidoStyles As String = ReemplazaXMLODT(My.Computer.FileSystem.ReadAllText(sStylesxml), Valores)
|
||||
My.Computer.FileSystem.WriteAllText(sContentxml, sContenidoContent, False)
|
||||
My.Computer.FileSystem.WriteAllText(sStylesxml, sContenidoStyles, False)
|
||||
Zip.ComprimirDirectorio(sDirectorioTMP, FicheroODTRelleno)
|
||||
zip.ComprimirDirectorio(sDirectorioTMP, FicheroODTRelleno)
|
||||
Catch ex As Exception
|
||||
Throw New Exception("Error en RellenaODT " & ex.Message, ex)
|
||||
End Try
|
||||
@@ -343,8 +344,8 @@ Public Class Informes
|
||||
Dim sContentTmp2 As String = tsl5.Utilidades.ObtieneFicheroAleatorio("xml")
|
||||
Dim sStylesTmp As String = tsl5.Utilidades.ObtieneFicheroAleatorio("xml")
|
||||
Dim sStylesTmp2 As String = tsl5.Utilidades.ObtieneFicheroAleatorio("xml")
|
||||
Zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
Zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
Dim ds As New DataSet
|
||||
Dim dt As New DataTable
|
||||
dt = drCabecera.Table.Clone
|
||||
@@ -354,8 +355,8 @@ Public Class Informes
|
||||
dt.TableName = "cabecera"
|
||||
RellenaXML(ds, sContentTmp, sContentTmp2, SiNoComoX)
|
||||
RellenaXML(ds, sStylesTmp, sStylesTmp2, SiNoComoX)
|
||||
Zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
Zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
@@ -367,13 +368,13 @@ Public Class Informes
|
||||
Dim sStylesTmp As String = tsl5.Utilidades.ObtieneFicheroAleatorio("xml")
|
||||
Dim sStylesTmp2 As String = tsl5.Utilidades.ObtieneFicheroAleatorio("xml")
|
||||
|
||||
Zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
Zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
|
||||
RellenaXML(ds, sContentTmp, sContentTmp2, SiNoComoX)
|
||||
RellenaXML(ds, sStylesTmp, sStylesTmp2, SiNoComoX)
|
||||
Zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
Zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
End Sub
|
||||
'Public Shared Sub RellenaODTEtiquetas(ByVal ds As DataSet, CampoIndice As String, ByVal FicheroODT As String)
|
||||
' 'PKICOAATSE.UtilsBArray.Array2Fichero(PlantillaODT, "", FicheroDestinoODT)
|
||||
@@ -409,16 +410,16 @@ Public Class Informes
|
||||
|
||||
' Dim odttmp As String = tsl5.Utilidades.ObtieneFicheroAleatorio("odt")
|
||||
' IO.File.Copy(FicheroODT, odttmp)
|
||||
Zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
Zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
Zip.ExtraerArchivo(FicheroODT, "meta.xml", sMetaTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "content.xml", sContentTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "styles.xml", sStylesTmp)
|
||||
zip.ExtraerArchivo(FicheroODT, "meta.xml", sMetaTmp)
|
||||
RellenaXML(ds, sContentTmp, sContentTmp2, CampoIndice, TipoInforme, SiNoComoX)
|
||||
'IO.File.Copy(sStylesTmp, sStylesTmp2, True)
|
||||
RellenaXML(ds, sStylesTmp, sStylesTmp2, SiNoComoX)
|
||||
CorrigeMeta(sMetaTmp, sMetaTmp2, ds.Tables("cabecera").Rows.Count)
|
||||
Zip.AñadirArchivo(FicheroODT, sMetaTmp2, "content.xml")
|
||||
Zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
Zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sMetaTmp2, "content.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sContentTmp2, "content.xml")
|
||||
zip.AñadirArchivo(FicheroODT, sStylesTmp2, "styles.xml")
|
||||
End Sub
|
||||
|
||||
Public Shared Sub RellenaXML(ByVal ds As DataSet, ByVal FicheroOrigenXML As String, ByVal FicheroDestinoXML As String, Optional SiNoComoX As Boolean = False)
|
||||
|
||||
Reference in New Issue
Block a user