-- cambio en alerta de guardado

This commit is contained in:
rrene
2020-10-08 18:12:28 -07:00
parent 28b42b681f
commit 5264f95b7d

View File

@@ -983,32 +983,37 @@ Partial Class ContabilidadC_RegPrePoliza
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
Catch ex As Exception
MsgError = "Error"
End Try
If MsgError = "" Then If MsgError = "" Then
'MENSAJE IE
If CveIE > 0 Then 'MENSAJE IE
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE) If CveIE > 0 Then
Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", 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 Else
Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
End If End If
Catch ex As Exception
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtObservaciones.Text = ""
GvMov.DataBind()
TxtFecha.Text = ""
TxtObservaciones.Text = ""
Else
ObjIE.RollBack() ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.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() ObjIE.Dispose()
ObjMov.Dispose() ObjMov.Dispose()