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 FacturaSerieFolio As String
|
||||
Public Property FacturaDescripcion As String
|
||||
Public Property FacturaFecha As Date
|
||||
Public Property FacturaFecha As Date
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
@@ -240,6 +243,18 @@ Public Class ClsBancos
|
||||
End Sub
|
||||
#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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -1612,18 +1627,21 @@ Public Class ClsBancos
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.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
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
'Catch Ex1 As SqlException
|
||||
' If Ex1.Message.Contains("Número: 2627;") Then
|
||||
' 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())
|
||||
' End If
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
|
||||
Retorno = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@TerminoCorrecto").Value.ToString)
|
||||
|
||||
|
||||
'Catch Ex1 As SqlException
|
||||
|
||||
' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
@@ -4752,13 +4752,26 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
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()
|
||||
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
|
||||
|
||||
Alert("El documento no ha sido eliminado.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||
Banc.RollBack()
|
||||
|
||||
If Banc.ExisteConeccion Then
|
||||
Banc.RollBack()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user