Se agregó bitácora en Trigger
This commit is contained in:
@@ -1316,7 +1316,7 @@ Public Class ClsBancos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1,
|
Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||||
Optional Observaciones As String = "-1") As Boolean
|
Optional Observaciones As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_IEUpdate")
|
DataAdapter("PA_Banc_IEUpdate")
|
||||||
@@ -1337,7 +1337,7 @@ Public Class ClsBancos
|
|||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
|
|
||||||
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -424,32 +424,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CuentaOld As String
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CuentaOld"), String)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
ViewState("CuentaOld") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property FechaOld As String
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("FechaOld"), String)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
ViewState("FechaOld") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property FolioOld As String
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("FolioOld"), String)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
ViewState("FolioOld") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
||||||
@@ -1122,10 +1096,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' DATOS PARA LA BITACORA
|
|
||||||
CuentaOld = LblCuenta.Text
|
|
||||||
FechaOld = TxtFechaDocumento.Text
|
|
||||||
FolioOld = TxtFolio.Text
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3724,45 +3694,23 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Dim IE As New ClsBancos
|
Dim IE As New ClsBancos
|
||||||
IE.IniciaTransacSQL()
|
IE.IniciaTransacSQL()
|
||||||
Dim ObjGral As New ClsGenerales
|
|
||||||
ObjGral.IniciaTransacSQL()
|
|
||||||
Dim FechaAplicado As DateTime? = Nothing
|
Dim FechaAplicado As DateTime? = Nothing
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
|
|
||||||
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
||||||
|
|
||||||
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
If Not IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||||
Observaciones:=TxtObservaciones.Text) Then
|
Observaciones:=TxtObservaciones.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
'Agrega a la Bitacora
|
|
||||||
If CuentaOld <> DdlCuenta.SelectedItem.Text Then
|
|
||||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, DdlCuenta.SelectedItem.Text, CuentaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Cuenta", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If FechaOld <> TxtFechaDocumento.Text.Trim Then
|
|
||||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFechaDocumento.Text.Trim, FechaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Fecha", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If FolioOld <> TxtFolio.Text.Trim Then
|
|
||||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFolio.Text.Trim, FolioOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Número", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If OcurrioError Then
|
If OcurrioError Then
|
||||||
IE.RollBack()
|
IE.RollBack()
|
||||||
ObjGral.RollBack()
|
|
||||||
Else
|
Else
|
||||||
IE.Commit()
|
IE.Commit()
|
||||||
ObjGral.Commit()
|
|
||||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||||
End If
|
End If
|
||||||
IE.Dispose()
|
IE.Dispose()
|
||||||
ObjGral.Dispose()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user