From 4848dc42895b04160c4981dbd80ee7c5dfad1aa0 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 1 Jul 2026 10:31:17 +0200 Subject: [PATCH] =?UTF-8?q?'=20=20=2001/07/2026=20V=205.0.10=20Cambios=20e?= =?UTF-8?q?n=20guardar.=20En=20caso=20de=20una=20excepci=C3=B3n=20de=20con?= =?UTF-8?q?currencia=20se=20intenta=20desabilitando=20la=20detecci=C3=B3n?= =?UTF-8?q?=20de=20la=20misma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Baget/Aplicacion.nuspec | 2 +- My Project/AssemblyInfo.vb | 8 ++++++-- Obsoleto/ApCabLin.vb | 22 ++++++++++------------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Baget/Aplicacion.nuspec b/Baget/Aplicacion.nuspec index 81be2f7..00ef9a0 100644 --- a/Baget/Aplicacion.nuspec +++ b/Baget/Aplicacion.nuspec @@ -2,7 +2,7 @@ tsWPF - 5.0.9.0 + 5.0.10.0 Tecnosis Tecnosis false diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 44bf2fb..a35aa9d 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -55,10 +55,14 @@ Imports System.Windows ' mediante el asterisco ('*'), como se muestra a continuación: ' - - + + +' Cambios en la versión 5.0.10.0 + +' 01/07/2026 V 5.0.10 Cambios en guardar. En caso de una excepción de concurrencia se intenta desabilitando la detección de la misma + ' Cambios en la versión 5.0.9.0 ' 02/06/2026 V 5.0.9 Se cambia sobrecarga de CombinaDocx a una nueva funcion CombinaDocxPdfPorBloques diff --git a/Obsoleto/ApCabLin.vb b/Obsoleto/ApCabLin.vb index c755be3..9624bb1 100644 --- a/Obsoleto/ApCabLin.vb +++ b/Obsoleto/ApCabLin.vb @@ -684,14 +684,9 @@ Public Class ApCabLin Me.bdEntidad.SaveChanges() End If - Catch ex As Exception - Try - Dim xml = tsl5.Utilidades.Serializar(Me.DataContext) - Dim ex2 As New Exception("Error en SaveChanges. Estado:" & Me.Estado.ToString & " Datos del registro" & xml & " " & ex.Message, ex) - If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex2) - Catch ex3 As Exception - End Try - Throw + Catch ex As OptimisticConcurrencyException + If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex) + Me.bdEntidad.SaveChanges(SaveOptions.AcceptAllChangesAfterSave) End Try If Not OcultarStoryBoard Then Me.ContenedorCL.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorCL.IniciaAnimacion("Datos Guardados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal) If Me.Estado = EstadosCablin.Nuevo Then @@ -720,11 +715,14 @@ Public Class ApCabLin Cancelar = True End If End If - Catch ex As OptimisticConcurrencyException - If DXSplashScreen.IsActive Then DXSplashScreen.Close() - DXMessageBox.Show("Los datos cargados fueron modificados por otro proceso por lo que no pueden ser guardados. Se mostrarán los nuevos datos.", "Atención") - RefrescaUC(True) + 'Catch ex As OptimisticConcurrencyException + ' If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex) + ' Cancelar = True + ' If DXSplashScreen.IsActive Then DXSplashScreen.Close() + ' DXMessageBox.Show("Los datos cargados fueron modificados por otro proceso por lo que no pueden ser guardados. Se mostrarán los nuevos datos.", "Atención") + ' RefrescaUC(True) Catch ex As Exception + If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex) If DXSplashScreen.IsActive Then DXSplashScreen.Close() Cancelar = True Dim sMensaje As String = ex.Message