- 2026-09-15 V1.4.5 Corrección ocultación de botón previsualizar
This commit is contained in:
@@ -271,7 +271,7 @@ Public Class ContenedorAplicacion
|
|||||||
Private Sub BtCapturar_ItemClick(sender As Object, e As ItemClickEventArgs)
|
Private Sub BtCapturar_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
Dim sficherojpg = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("jpg")
|
Dim sficherojpg = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("jpg")
|
||||||
IO.File.WriteAllBytes(sficherojpg, Me._Aplicacion.ObtieneImagen(1, 100))
|
IO.File.WriteAllBytes(sficherojpg, Me._Aplicacion.ObtieneImagen(1, 100))
|
||||||
Process.Start(sficherojpg)
|
tsUtilidades.Sistema.EjecutaFichero(sficherojpg)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtExportar_ItemClick(sender As Object, e As ItemClickEventArgs)
|
Private Sub BtExportar_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
@@ -369,7 +369,7 @@ Public Class ContenedorAplicacion
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
wb.SaveDocument(sfd.FileName, formato)
|
wb.SaveDocument(sfd.FileName, formato)
|
||||||
Process.Start(sfd.FileName)
|
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
DXMessageBox.Show(ex.Message, "Error")
|
DXMessageBox.Show(ex.Message, "Error")
|
||||||
|
|||||||
@@ -127,12 +127,12 @@ Public MustInherit Class tsUserControl
|
|||||||
End Get
|
End Get
|
||||||
Set(value As EstadosAplicacion)
|
Set(value As EstadosAplicacion)
|
||||||
Dim EstadoAnterior As EstadosAplicacion = _Estado
|
Dim EstadoAnterior As EstadosAplicacion = _Estado
|
||||||
If EstadoAnterior = EstadosAplicacion.ModificandoRegistro And value <> EstadosAplicacion.Nuevo AndAlso BloqueoActivo IsNot Nothing Then _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.DESBLOQUEAR)
|
If EstadoAnterior = EstadosAplicacion.ModificandoRegistro AndAlso value <> EstadosAplicacion.Nuevo AndAlso BloqueoActivo IsNot Nothing Then _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.DESBLOQUEAR)
|
||||||
If CambiarEstado(EstadoAnterior, value) Then
|
If CambiarEstado(EstadoAnterior, value) Then
|
||||||
_Estado = value
|
_Estado = value
|
||||||
RaiseEvent EstadoCambiado(EstadoAnterior, _Estado)
|
RaiseEvent EstadoCambiado(EstadoAnterior, _Estado)
|
||||||
If value = EstadosAplicacion.ModificandoRegistro And _DelegadoBloqueo IsNot Nothing Then BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.BLOQUEAR)
|
If value = EstadosAplicacion.ModificandoRegistro AndAlso _DelegadoBloqueo IsNot Nothing Then BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.BLOQUEAR)
|
||||||
CompruebaBloqueo
|
CompruebaBloqueo()
|
||||||
If Me.docpanel IsNot Nothing Then Me.docpanel.Tag = Me.idRegistroAplicacionActual
|
If Me.docpanel IsNot Nothing Then Me.docpanel.Tag = Me.idRegistroAplicacionActual
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -349,6 +349,7 @@ Public MustInherit Class tsUserControl
|
|||||||
EstableceDataContextSecundarios(BackGround)
|
EstableceDataContextSecundarios(BackGround)
|
||||||
_ContenedorAplicacion.bePlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
_ContenedorAplicacion.bePlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
||||||
_ContenedorAplicacion.btImprimirPlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
_ContenedorAplicacion.btImprimirPlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
||||||
|
_ContenedorAplicacion.btPrevisualizaPlantilla.IsVisible = _ContenedorAplicacion.btImprimirPlantilla.IsVisible
|
||||||
_ContenedorAplicacion.beAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
_ContenedorAplicacion.beAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
||||||
_ContenedorAplicacion.btAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
_ContenedorAplicacion.btAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -372,21 +373,21 @@ Public MustInherit Class tsUserControl
|
|||||||
Private Sub uc_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
Private Sub uc_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
Select Case e.Key
|
Select Case e.Key
|
||||||
Case Key.F1
|
Case Key.F1
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btGuardarYBuscar.IsVisible And Me.ContenedorAplicacion.btGuardarYBuscar.IsEnabled Then Me.ContenedorAplicacion.btGuardarYBuscar_ItemClick(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btGuardarYBuscar.IsVisible AndAlso Me.ContenedorAplicacion.btGuardarYBuscar.IsEnabled Then Me.ContenedorAplicacion.btGuardarYBuscar_ItemClick(Nothing, Nothing)
|
||||||
Case Key.F2
|
Case Key.F2
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btGuardar.IsVisible And Me.ContenedorAplicacion.btGuardar.IsEnabled Then Me.ContenedorAplicacion.btGuardar_ItemClick(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btGuardar.IsVisible AndAlso Me.ContenedorAplicacion.btGuardar.IsEnabled Then Me.ContenedorAplicacion.btGuardar_ItemClick(Nothing, Nothing)
|
||||||
Case Key.F3
|
Case Key.F3
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btBuscar.IsVisible And Me.ContenedorAplicacion.btBuscar.IsEnabled Then Me.ContenedorAplicacion.btBuscar_ItemClick(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btBuscar.IsVisible AndAlso Me.ContenedorAplicacion.btBuscar.IsEnabled Then Me.ContenedorAplicacion.btBuscar_ItemClick(Nothing, Nothing)
|
||||||
Case Key.F4
|
Case Key.F4
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btNuevo.IsVisible And Me.ContenedorAplicacion.btNuevo.IsEnabled Then Me.ContenedorAplicacion.Nuevo(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btNuevo.IsVisible AndAlso Me.ContenedorAplicacion.btNuevo.IsEnabled Then Me.ContenedorAplicacion.Nuevo(Nothing, Nothing)
|
||||||
Case Key.F5
|
Case Key.F5
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btActualizar.IsVisible And Me.ContenedorAplicacion.btActualizar.IsEnabled Then Me.ContenedorAplicacion.btActualizar_ItemClick(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btActualizar.IsVisible AndAlso Me.ContenedorAplicacion.btActualizar.IsEnabled Then Me.ContenedorAplicacion.btActualizar_ItemClick(Nothing, Nothing)
|
||||||
Case Key.F7
|
Case Key.F7
|
||||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btImprimirPlantilla.IsVisible And Me.ContenedorAplicacion.btImprimirPlantilla.IsEnabled Then Me.ContenedorAplicacion.btImprimirPlantilla_ItemClick(Nothing, Nothing)
|
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btImprimirPlantilla.IsVisible AndAlso Me.ContenedorAplicacion.btImprimirPlantilla.IsEnabled Then Me.ContenedorAplicacion.btImprimirPlantilla_ItemClick(Nothing, Nothing)
|
||||||
Case Key.F8
|
Case Key.F8
|
||||||
Comun.dm.DockController.RemovePanel(docpanel)
|
Comun.dm.DockController.RemovePanel(docpanel)
|
||||||
Case Key.Pause
|
Case Key.Pause
|
||||||
If Keyboard.Modifiers = ModifierKeys.Shift And ModoSuperUsuario = False And Configuracion.FuncionModoSuperUsuario IsNot Nothing Then
|
If Keyboard.Modifiers = ModifierKeys.Shift AndAlso ModoSuperUsuario = False AndAlso Configuracion.FuncionModoSuperUsuario IsNot Nothing Then
|
||||||
ModoSuperUsuario = Configuracion.FuncionModoSuperUsuario(Me)
|
ModoSuperUsuario = Configuracion.FuncionModoSuperUsuario(Me)
|
||||||
If ModoSuperUsuario Then
|
If ModoSuperUsuario Then
|
||||||
'Me.ContenedorCL.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorCL.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
'Me.ContenedorCL.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorCL.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||||
@@ -421,7 +422,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Case Else
|
Case Else
|
||||||
bContinuar = True
|
bContinuar = True
|
||||||
End Select
|
End Select
|
||||||
If bContinuar And CapturarEnter Then
|
If bContinuar AndAlso CapturarEnter Then
|
||||||
|
|
||||||
Dim os As ObjetoSeleccionable = (From o In ObjetosSeleccionables Where o.PropiedadesTS.NumeroObjeto = clave).First
|
Dim os As ObjetoSeleccionable = (From o In ObjetosSeleccionables Where o.PropiedadesTS.NumeroObjeto = clave).First
|
||||||
Dim i As Integer = ObjetosSeleccionables.IndexOf(os)
|
Dim i As Integer = ObjetosSeleccionables.IndexOf(os)
|
||||||
@@ -437,7 +438,7 @@ Public MustInherit Class tsUserControl
|
|||||||
'Dim pt As Object = ObjetosSeleccionables(i).Objeto.parent
|
'Dim pt As Object = ObjetosSeleccionables(i).Objeto.parent
|
||||||
'If pt IsNot Nothing AndAlso pt.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
'If pt IsNot Nothing AndAlso pt.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
||||||
' Dim tb As DevExpress.Xpf.Core.DXTabItem = pt
|
' Dim tb As DevExpress.Xpf.Core.DXTabItem = pt
|
||||||
' If Not tb.IsSelected And tb.Visibility = Visibility.Visible Then
|
' If Not tb.IsSelected andalso tb.Visibility = Visibility.Visible Then
|
||||||
' btbDeshabilitado = True
|
' btbDeshabilitado = True
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
@@ -449,7 +450,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Do While Not p Is Nothing
|
Do While Not p Is Nothing
|
||||||
If p.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
If p.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
||||||
Dim tb As DevExpress.Xpf.Core.DXTabItem = p
|
Dim tb As DevExpress.Xpf.Core.DXTabItem = p
|
||||||
If Not tb.IsSelected And tb.Visibility = Visibility.Visible Then
|
If Not tb.IsSelected AndAlso tb.Visibility = Visibility.Visible Then
|
||||||
|
|
||||||
' bEnfocar = False
|
' bEnfocar = False
|
||||||
'p.focus()
|
'p.focus()
|
||||||
@@ -497,7 +498,7 @@ Public MustInherit Class tsUserControl
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not ObjetoActual Is Nothing AndAlso Keyboard.Modifiers = ModifierKeys.Control Then
|
If Not ObjetoActual Is Nothing AndAlso Keyboard.Modifiers = ModifierKeys.Control Then
|
||||||
If (e.Key = Key.Insert OrElse e.Key = Key.A) And ObjetoActual.GetType Is GetType(tsGridControl) Then
|
If (e.Key = Key.Insert OrElse e.Key = Key.A) AndAlso ObjetoActual.GetType Is GetType(tsGridControl) Then
|
||||||
Dim gc As tsGridControl = TryCast(ObjetoActual, tsGridControl)
|
Dim gc As tsGridControl = TryCast(ObjetoActual, tsGridControl)
|
||||||
gc.View.CommitEditing()
|
gc.View.CommitEditing()
|
||||||
|
|
||||||
@@ -525,7 +526,7 @@ Public MustInherit Class tsUserControl
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'Else
|
'Else
|
||||||
' If (e.Key = Key.A OrElse e.Key = Key.R) And Keyboard.Modifiers = ModifierKeys.Control Then
|
' If (e.Key = Key.A OrElse e.Key = Key.R) andalso Keyboard.Modifiers = ModifierKeys.Control Then
|
||||||
|
|
||||||
' Dim scaler = TryCast(dm.LayoutTransform, ScaleTransform)
|
' Dim scaler = TryCast(dm.LayoutTransform, ScaleTransform)
|
||||||
|
|
||||||
@@ -549,7 +550,7 @@ Public MustInherit Class tsUserControl
|
|||||||
' End If
|
' End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If (Keyboard.Modifiers And ModifierKeys.Control) AndAlso e.Key = Key.B Then
|
If (Keyboard.Modifiers AndAlso ModifierKeys.Control) AndAlso e.Key = Key.B Then
|
||||||
If Me.GridSeleccion IsNot Nothing OrElse Me.GridBusqueda IsNot Nothing Then
|
If Me.GridSeleccion IsNot Nothing OrElse Me.GridBusqueda IsNot Nothing Then
|
||||||
If GridBusqueda IsNot Nothing Then
|
If GridBusqueda IsNot Nothing Then
|
||||||
Dim tv = TryCast(Me.GridBusqueda.View, TableView)
|
Dim tv = TryCast(Me.GridBusqueda.View, TableView)
|
||||||
@@ -838,7 +839,7 @@ Public MustInherit Class tsUserControl
|
|||||||
ObjetosSeleccionables.Add(os)
|
ObjetosSeleccionables.Add(os)
|
||||||
|
|
||||||
Dim be As BindingExpression = bte.GetBindingExpression(BaseEdit.EditValueProperty)
|
Dim be As BindingExpression = bte.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||||
Dim Longitud As Integer
|
Dim Longitud As Integer
|
||||||
If bte.DataContext Is Nothing Then
|
If bte.DataContext Is Nothing Then
|
||||||
@@ -866,7 +867,7 @@ Public MustInherit Class tsUserControl
|
|||||||
ObjetosSeleccionables.Add(os)
|
ObjetosSeleccionables.Add(os)
|
||||||
|
|
||||||
Dim be As BindingExpression = pbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
Dim be As BindingExpression = pbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||||
Dim Longitud As Integer
|
Dim Longitud As Integer
|
||||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||||
If pbe.DataContext Is Nothing Then
|
If pbe.DataContext Is Nothing Then
|
||||||
@@ -896,7 +897,7 @@ Public MustInherit Class tsUserControl
|
|||||||
ObjetosSeleccionables.Add(os)
|
ObjetosSeleccionables.Add(os)
|
||||||
|
|
||||||
Dim be As BindingExpression = te.GetBindingExpression(BaseEdit.EditValueProperty)
|
Dim be As BindingExpression = te.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||||
Dim Longitud As Integer
|
Dim Longitud As Integer
|
||||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||||
If te.DataContext Is Nothing Then
|
If te.DataContext Is Nothing Then
|
||||||
@@ -936,7 +937,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Dim os As New ObjetoSeleccionable(cbe, cbe.TabIndex, o.PropiedadesTS)
|
Dim os As New ObjetoSeleccionable(cbe, cbe.TabIndex, o.PropiedadesTS)
|
||||||
ObjetosSeleccionables.Add(os)
|
ObjetosSeleccionables.Add(os)
|
||||||
Dim be As BindingExpression = cbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
Dim be As BindingExpression = cbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||||
Dim Longitud As Integer
|
Dim Longitud As Integer
|
||||||
If cbe.DataContext Is Nothing Then
|
If cbe.DataContext Is Nothing Then
|
||||||
@@ -1200,8 +1201,8 @@ Public MustInherit Class tsUserControl
|
|||||||
If e.Key = Key.Enter Then
|
If e.Key = Key.Enter Then
|
||||||
Try
|
Try
|
||||||
Dim tsgc As tsGridControl = DirectCast(sender, tsGridControl)
|
Dim tsgc As tsGridControl = DirectCast(sender, tsGridControl)
|
||||||
If tsgc.Columns.Any(Function(x) x.CellTemplate IsNot Nothing) And tsgc.View.AllowEditing = False Then
|
If tsgc.Columns.Any(Function(x) x.CellTemplate IsNot Nothing) AndAlso tsgc.View.AllowEditing = False Then
|
||||||
If tsgc.CurrentItem IsNot Nothing And tsgc.CurrentColumn.CellTemplate IsNot Nothing Then
|
If tsgc.CurrentItem IsNot Nothing AndAlso tsgc.CurrentColumn.CellTemplate IsNot Nothing Then
|
||||||
RaiseEvent Enlazar(Nothing, True)
|
RaiseEvent Enlazar(Nothing, True)
|
||||||
e.Handled = True
|
e.Handled = True
|
||||||
End If
|
End If
|
||||||
@@ -1285,7 +1286,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Throw New Exception("No se permite valores duplicados en la columna " & tsgc.Columns(sCampo).Header)
|
Throw New Exception("No se permite valores duplicados en la columna " & tsgc.Columns(sCampo).Header)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Exit Do
|
Exit Do
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1332,7 +1333,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Next
|
Next
|
||||||
For Each rw In tsgc.GetSelectedRowHandles
|
For Each rw In tsgc.GetSelectedRowHandles
|
||||||
Try
|
Try
|
||||||
If vista.GetType = GetType(TableView) Then
|
If vista.GetType.BaseType = GetType(TableView) OrElse vista.GetType Is GetType(tsTableView) Then
|
||||||
DirectCast(vista, TableView).DeleteRow(rw)
|
DirectCast(vista, TableView).DeleteRow(rw)
|
||||||
Else
|
Else
|
||||||
DirectCast(vista, CardView).DeleteRow(rw)
|
DirectCast(vista, CardView).DeleteRow(rw)
|
||||||
@@ -1352,7 +1353,7 @@ Public MustInherit Class tsUserControl
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Debug.WriteLine(ex.Message)
|
Debug.WriteLine(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
If vista.GetType = GetType(TableView) Then
|
If vista.GetType = GetType(TableView) OrElse vista.GetType = GetType(tsTableView) Then
|
||||||
DirectCast(vista, TableView).DeleteRow(vista.FocusedRowHandle)
|
DirectCast(vista, TableView).DeleteRow(vista.FocusedRowHandle)
|
||||||
Else
|
Else
|
||||||
DirectCast(vista, CardView).DeleteRow(vista.FocusedRowHandle)
|
DirectCast(vista, CardView).DeleteRow(vista.FocusedRowHandle)
|
||||||
@@ -1378,11 +1379,11 @@ Public MustInherit Class tsUserControl
|
|||||||
Dim EliminacionManual As Boolean = False
|
Dim EliminacionManual As Boolean = False
|
||||||
RaiseEvent AntesEliminar(sender, e, Cancelar, MensajesError, EliminacionManual)
|
RaiseEvent AntesEliminar(sender, e, Cancelar, MensajesError, EliminacionManual)
|
||||||
If ErroresValidacion.Errores.Count > 0 Then
|
If ErroresValidacion.Errores.Count > 0 Then
|
||||||
If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical And Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical AndAlso Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||||
Cancelar = True
|
Cancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Not Cancelar And GridSeleccion IsNot Nothing Then
|
If Not Cancelar AndAlso GridSeleccion IsNot Nothing Then
|
||||||
If GridSeleccion.ElementosSeleccionados IsNot Nothing AndAlso _ContenedorAplicacion.btSeleccionar.IsChecked AndAlso GridSeleccion.ElementosSeleccionados.Any Then
|
If GridSeleccion.ElementosSeleccionados IsNot Nothing AndAlso _ContenedorAplicacion.btSeleccionar.IsChecked AndAlso GridSeleccion.ElementosSeleccionados.Any Then
|
||||||
If EliminacionManual OrElse DXMessageBox.Show("¿Está seguro de querer eliminar los registros seleccionados?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.Yes Then
|
If EliminacionManual OrElse DXMessageBox.Show("¿Está seguro de querer eliminar los registros seleccionados?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.Yes Then
|
||||||
ErroresValidacion.LimpiarErrores("Almacenar-")
|
ErroresValidacion.LimpiarErrores("Almacenar-")
|
||||||
@@ -1470,7 +1471,7 @@ Public MustInherit Class tsUserControl
|
|||||||
For Each it In its
|
For Each it In its
|
||||||
Select Case it.tag
|
Select Case it.tag
|
||||||
Case "MI_ELIMINA"
|
Case "MI_ELIMINA"
|
||||||
it.isEnabled = If(Me.Estado = EstadosAplicacion.AplicacionSinIndice, tsgc.PropiedadesTSGC.PermitirEliminar, True) And tsgc.PropiedadesTSGC.PermitirEliminar And ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnExistentes And Me.Estado = EstadosAplicacion.ModificandoRegistro) Or ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnNuevos And Me.Estado = EstadosAplicacion.Nuevo) Or tsgc.PropiedadesTS.Modificable = TiposModificacion.Modificable))
|
it.isEnabled = If(Me.Estado = EstadosAplicacion.AplicacionSinIndice, tsgc.PropiedadesTSGC.PermitirEliminar, True) AndAlso tsgc.PropiedadesTSGC.PermitirEliminar AndAlso ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnExistentes AndAlso Me.Estado = EstadosAplicacion.ModificandoRegistro) Or ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnNuevos AndAlso Me.Estado = EstadosAplicacion.Nuevo) Or tsgc.PropiedadesTS.Modificable = TiposModificacion.Modificable))
|
||||||
Case "MI_EXPORTAR_EXCEL", "MI_EXPORTAR"
|
Case "MI_EXPORTAR_EXCEL", "MI_EXPORTAR"
|
||||||
If tsgc.PropiedadesTSGC.PermitirExportar.HasValue Then
|
If tsgc.PropiedadesTSGC.PermitirExportar.HasValue Then
|
||||||
it.isenabled = tsgc.PropiedadesTSGC.PermitirExportar.Value
|
it.isenabled = tsgc.PropiedadesTSGC.PermitirExportar.Value
|
||||||
@@ -1521,7 +1522,7 @@ Public MustInherit Class tsUserControl
|
|||||||
vista.ExportToCsv(sfd.FileName)
|
vista.ExportToCsv(sfd.FileName)
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Process.Start(sfd.FileName)
|
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex)
|
If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex)
|
||||||
@@ -1608,7 +1609,7 @@ Public MustInherit Class tsUserControl
|
|||||||
ValidaControlObjetoActual()
|
ValidaControlObjetoActual()
|
||||||
|
|
||||||
'If ErroresValidacion.Errores.Count > 0 Then
|
'If ErroresValidacion.Errores.Count > 0 Then
|
||||||
' If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical And Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
' If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical andalso Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||||
' Cancelar = True
|
' Cancelar = True
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
@@ -1660,7 +1661,7 @@ Public MustInherit Class tsUserControl
|
|||||||
BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.ACTUALIZAVERSION)
|
BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.ACTUALIZAVERSION)
|
||||||
End If
|
End If
|
||||||
RaiseEvent DespuesGuardar(sender, e, OpcionGuardado)
|
RaiseEvent DespuesGuardar(sender, e, OpcionGuardado)
|
||||||
If FuerzaCambioEstado And OpcionGuardado <> 1 Then
|
If FuerzaCambioEstado AndAlso OpcionGuardado <> 1 Then
|
||||||
If Not OcultarStoryBoard Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
If Not OcultarStoryBoard Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||||
If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||||
If Me.Estado = EstadosAplicacion.Nuevo Then
|
If Me.Estado = EstadosAplicacion.Nuevo Then
|
||||||
@@ -1717,7 +1718,7 @@ Public MustInherit Class tsUserControl
|
|||||||
RaiseEvent DespuesCancelarGuardar(sender, e, OpcionGuardado)
|
RaiseEvent DespuesCancelarGuardar(sender, e, OpcionGuardado)
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
If Cancelar And ErroresValidacion.Errores.Count > 0 And Not OcultarStoryBoard Then
|
If Cancelar AndAlso ErroresValidacion.Errores.Count > 0 AndAlso Not OcultarStoryBoard Then
|
||||||
Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos no guardadados. Revise los mensajes.", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos no guardadados. Revise los mensajes.", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||||
If ModoSuperUsuario Then If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
If ModoSuperUsuario Then If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||||
End If
|
End If
|
||||||
@@ -1728,8 +1729,8 @@ Public MustInherit Class tsUserControl
|
|||||||
Try
|
Try
|
||||||
CompruebaObligatoriosOUnicos = True
|
CompruebaObligatoriosOUnicos = True
|
||||||
For Each c In ControlesTS.Where(Function(x) x.PropiedadesTS.Unico OrElse x.PropiedadesTS.Obligatorio).ToList
|
For Each c In ControlesTS.Where(Function(x) x.PropiedadesTS.Unico OrElse x.PropiedadesTS.Obligatorio).ToList
|
||||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos And CompruebaObligatorio(c)
|
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos AndAlso CompruebaObligatorio(c)
|
||||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos And CompruebaUnico(c)
|
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos AndAlso CompruebaUnico(c)
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Throw New Exception(ex.Message, ex)
|
Throw New Exception(ex.Message, ex)
|
||||||
@@ -1804,14 +1805,14 @@ Public MustInherit Class tsUserControl
|
|||||||
' Parametros(0) = valor
|
' Parametros(0) = valor
|
||||||
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
||||||
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
||||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = :0 and " & NombreTablaBase & "." & CampoIndice & " <> :1", Parametros).Any
|
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = :0 andalso " & NombreTablaBase & "." & CampoIndice & " <> :1", Parametros).Any
|
||||||
' Return Not r
|
' Return Not r
|
||||||
' Else
|
' Else
|
||||||
' Dim Parametros(1) As Object
|
' Dim Parametros(1) As Object
|
||||||
' Parametros(0) = valor
|
' Parametros(0) = valor
|
||||||
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
||||||
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
||||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = {0} and " & NombreTablaBase & "." & CampoIndice & " <> {1}", Parametros).Any
|
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = {0} andalso " & NombreTablaBase & "." & CampoIndice & " <> {1}", Parametros).Any
|
||||||
' Return Not r
|
' Return Not r
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|||||||
@@ -15,11 +15,14 @@
|
|||||||
<RootNamespace>tsWPFCore</RootNamespace>
|
<RootNamespace>tsWPFCore</RootNamespace>
|
||||||
<PackageId>tsWPFCore</PackageId>
|
<PackageId>tsWPFCore</PackageId>
|
||||||
<PackageTags>net8.0-windows, libreria</PackageTags>
|
<PackageTags>net8.0-windows, libreria</PackageTags>
|
||||||
<Version>1.4.2</Version>
|
<Version>1.4.5</Version>
|
||||||
<Authors>Manuel</Authors>
|
<Authors>Manuel</Authors>
|
||||||
<Company>Tecnosis S.A</Company>
|
<Company>Tecnosis S.A</Company>
|
||||||
<Description>Utilidades para aplicaciones WPF.</Description>
|
<Description>Utilidades para aplicaciones WPF.</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
|
- 2026-09-15 V1.4.5 Corrección ocultación de botón previsualizar
|
||||||
|
- 2026-09-15 V1.4.4 Se sustituye process.start por tsUtilidades.EjecutaFichero
|
||||||
|
- 2026-07-18 V1.4.3 Corrección compatibilidad con CardView
|
||||||
- 2026-07-17 V1.4.2 Se añade compatibilidad con CardView
|
- 2026-07-17 V1.4.2 Se añade compatibilidad con CardView
|
||||||
- 2026-07-17 V1.4.0 Se corrige rutina _Exportar
|
- 2026-07-17 V1.4.0 Se corrige rutina _Exportar
|
||||||
- 2026-05-22 V1.3.11 tamaño de columnas automatico en ienumerableaexcel
|
- 2026-05-22 V1.3.11 tamaño de columnas automatico en ienumerableaexcel
|
||||||
|
|||||||
Reference in New Issue
Block a user