log propio remisiones tsoft

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-11-11 16:53:43 -07:00
parent b45bbf85ea
commit a996c73812

View File

@@ -5,6 +5,7 @@ Imports System.Web
Imports System.Data
Imports System.Text
Imports Extensiones
Imports System.Web.Configuration
Public Class ClsTSoft
Inherits ClsClaseBase
@@ -181,4 +182,32 @@ Public Class ClsTSoft
Return retorno
End Function
#End Region
Protected Overloads Function RunQuery(msgOnError As String) As Boolean
Dim retorno As Boolean = False
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
retorno = False
setOnError(msgOnError, ex)
End Try
Return retorno
End Function
Public Overloads Sub setOnError(Mensaje As String, Exeption As Exception)
Dim InfoAdicional As String = ""
If SqlAdapter IsNot Nothing AndAlso SqlAdapter.SelectCommand IsNot Nothing AndAlso SqlAdapter.SelectCommand.Parameters IsNot Nothing Then
InfoAdicional = SqlAdapter.SelectCommand.Parameters.ParametrosInfo()
End If
MyCurrentError = String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)
OnError(Mensaje, Exeption, InfoAdicional)
End Sub
Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
GuardaLogAD(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional), "LogClsTsoft")
Alert(Obj, Mensaje, TipoMensaje.MsgError)
'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
End Sub
End Class