' 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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user