Merge branch 'master' of http://jarvizu@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -171,8 +171,11 @@ Public Class ClsBancos
|
|||||||
Public Property FacturaProveedor As String
|
Public Property FacturaProveedor As String
|
||||||
Public Property FacturaSerieFolio As String
|
Public Property FacturaSerieFolio As String
|
||||||
Public Property FacturaDescripcion As String
|
Public Property FacturaDescripcion As String
|
||||||
Public Property FacturaFecha As Date
|
Public Property FacturaFecha As Date
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||||
|
|
||||||
If TransaccionCompartida Is Nothing Then
|
If TransaccionCompartida Is Nothing Then
|
||||||
@@ -240,6 +243,18 @@ Public Class ClsBancos
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ExisteConeccion() As Boolean
|
||||||
|
|
||||||
|
If SqlTransacc.Connection Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -1612,18 +1627,21 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
|
.Add("@TerminoCorrecto", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
|
||||||
'Catch Ex1 As SqlException
|
|
||||||
' If Ex1.Message.Contains("Número: 2627;") Then
|
Retorno = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@TerminoCorrecto").Value.ToString)
|
||||||
' Alert("Ya existe un Banco con el mismo nombre: " & Banco & ".", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Else
|
|
||||||
' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
'Catch Ex1 As SqlException
|
||||||
' End If
|
|
||||||
|
' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -4752,13 +4752,26 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorCompra Then
|
If Not ErrorCompra Then
|
||||||
Alert("El documento bancario quedó eliminado.", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/RepIE.aspx""")
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||||
Banc.Commit()
|
|
||||||
|
If Banc.ExisteConeccion Then
|
||||||
|
Banc.Commit()
|
||||||
|
Alert("El documento bancario quedó eliminado.", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/RepIE.aspx""")
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Alert("El documento no ha sido eliminado.", TipoMensaje.MsgAdvertencia)
|
Alert("El documento no ha sido eliminado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||||
Banc.RollBack()
|
|
||||||
|
If Banc.ExisteConeccion Then
|
||||||
|
Banc.RollBack()
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user