diff --git a/ClasesComunes.vb b/ClasesComunes.vb
index e983878..5cd69ae 100644
--- a/ClasesComunes.vb
+++ b/ClasesComunes.vb
@@ -70,6 +70,7 @@ Public Class Configuracion
Public Shared BusquedaAcentosInsensitivo As Boolean = False
Public Delegate Function DelegadoModoSuperUsuario(Aplicacion As tsUserControl) As Boolean
Public Shared FuncionModoSuperUsuario As DelegadoModoSuperUsuario
+ Public Shared MostrarPrevisualizar As Boolean = True
End Class
diff --git a/ContenedorAplicacion.xaml b/ContenedorAplicacion.xaml
index 59664e6..b4434ef 100644
--- a/ContenedorAplicacion.xaml
+++ b/ContenedorAplicacion.xaml
@@ -74,6 +74,7 @@
+
@@ -107,6 +108,7 @@
+
diff --git a/ContenedorAplicacion.xaml.vb b/ContenedorAplicacion.xaml.vb
index b30fbb7..f4cea46 100644
--- a/ContenedorAplicacion.xaml.vb
+++ b/ContenedorAplicacion.xaml.vb
@@ -11,9 +11,7 @@ Imports DevExpress.Spreadsheet
Imports DevExpress.Xpf.Grid
Imports DevExpress.Mvvm.UI.Interactivity
Imports tsUtilidades.Extensiones
-Imports System.Data.Entity.Core.Objects
Imports tsUtilidades
-Imports System.Data.Entity.Core.Metadata.Edm
Public Class ContenedorAplicacion
Public _Aplicacion As tsUserControl
@@ -138,7 +136,12 @@ Public Class ContenedorAplicacion
Friend Sub btImprimirPlantilla_ItemClick(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs)
_Aplicacion.ValidaControlObjetoActual()
Dim idPlantilla As Integer = bePlantilla.EditValue
- _Aplicacion.LanzaImprimirPlantilla(sender, e, idPlantilla)
+ _Aplicacion.LanzaImprimirPlantilla(sender, e, idPlantilla, False)
+ End Sub
+ Friend Sub btPrevisualizaPlantilla_ItemClick(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs)
+ _Aplicacion.ValidaControlObjetoActual()
+ Dim idPlantilla As Integer = bePlantilla.EditValue
+ _Aplicacion.LanzaImprimirPlantilla(sender, e, idPlantilla, True)
End Sub
Private Sub btAcciones_ItemClick(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs)
diff --git a/tsUserControl.vb b/tsUserControl.vb
index 39ad368..5f02e50 100644
--- a/tsUserControl.vb
+++ b/tsUserControl.vb
@@ -100,7 +100,7 @@ Public MustInherit Class tsUserControl
Public Event EstadoCambiado(EstadoAnterior As EstadosAplicacion, EstadoNuevo As EstadosAplicacion)
Public Event Enlazar(Celda As EditGridCellData, Defecto As Boolean)
Public Event EjecutarAccion(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idAccion As Integer)
- Public Event ImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer)
+ Public Event ImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer, Previsualizar As Boolean)
Public Event TeclaFuncionPulsada(sender As Object, e As KeyEventArgs)
' Public Event AbreRegistroBuscado(uc As tsUserControl)
Public Event BotonNuevoPulsado()
@@ -714,6 +714,7 @@ Public MustInherit Class tsUserControl
ContenedorAplicacion.btGuardarYBuscar.IsVisible = False
ContenedorAplicacion.btBuscar.IsVisible = False
End If
+ If Configuracion.MostrarPrevisualizar = False Then ContenedorAplicacion.btPrevisualizaPlantilla.IsVisible = False
If Not Me.PermisosConcedidos.Exportar Then Me.ContenedorAplicacion.btExportar.IsEnabled = False
End If
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
@@ -1932,7 +1933,7 @@ Public MustInherit Class tsUserControl
DXMessageBox.Show("Error en LanzaEjecutaAccion " & ex.Message, "Error")
End Try
End Sub
- Sub LanzaImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer)
+ Sub LanzaImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer, Previsualizar As Boolean)
Try
Dim be As BaseEdit = Nothing
Try
@@ -1959,7 +1960,7 @@ Public MustInherit Class tsUserControl
linea.View.CommitEditing()
If linea.View.HasValidationError Then Cancelar = True
Next
- If Not Cancelar Then RaiseEvent ImprimirPlantilla(sender, e, idPlantilla)
+ If Not Cancelar Then RaiseEvent ImprimirPlantilla(sender, e, idPlantilla, Previsualizar)
Catch ex As Exception
Debug.Write(ex.Message)
End Try
diff --git a/tsWPFCore.vbproj b/tsWPFCore.vbproj
index 42f5495..b346ad2 100644
--- a/tsWPFCore.vbproj
+++ b/tsWPFCore.vbproj
@@ -15,11 +15,12 @@
tsWPFCore
tsWPFCore
net8.0-windows, libreria
- 1.3.7
+ 1.3.8
Manuel
Tecnosis S.A
Utilidades para aplicaciones WPF.
+ - 2025-10-20 V1.3.8 Se añade botón de previsualizar
- 2025-10-15 V1.3.7 Se añade dxwContrasenna
- 2025-07-29 V1.3.6 Se habilita la propiedad AllowMergedGrouping="True" en tsTableView
- 2025-07-06 V1.3.5 Correccion rutina impresión informes