diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index cd307959c..28d7b8831 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -982,34 +982,39 @@ Partial Class ContabilidadC_RegPrePoliza Else MsgError = "No se pudo insertar la póliza" - End If - Catch ex As Exception - MsgError = "Error" - End Try - - If MsgError = "" Then - 'MENSAJE IE - If CveIE > 0 Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) - Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") - Else - Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") - End If - - ObjIE.Commit() - If Conta IsNot Nothing Then Conta.Commit() - - UPPDocumento.Update() - - TxtObservaciones.Text = "" - GvMov.DataBind() - TxtFecha.Text = "" - TxtObservaciones.Text = "" - Else - ObjIE.RollBack() + End If + + If MsgError = "" Then + + 'MENSAJE IE + If CveIE > 0 Then + MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) + Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") + Else + Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") + End If + + ObjIE.Commit() + If Conta IsNot Nothing Then Conta.Commit() + + 'UPPDocumento.Update() + 'TxtObservaciones.Text = "" + 'GvMov.DataBind() + 'TxtFecha.Text = "" + 'TxtObservaciones.Text = "" + Else + ObjIE.RollBack() + If Conta IsNot Nothing Then Conta.RollBack() + End If + Catch ex As Exception + ObjIE.RollBack() If Conta IsNot Nothing Then Conta.RollBack() - End If - + Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgInformacion) + ex.GuardaLog(ex.Message) + End Try + + + ObjIE.Dispose() ObjMov.Dispose() If Conta IsNot Nothing Then Conta.Dispose()