log propio remisiones tsoft
This commit is contained in:
@@ -5,6 +5,7 @@ Imports System.Web
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports System.Web.Configuration
|
||||||
|
|
||||||
Public Class ClsTSoft
|
Public Class ClsTSoft
|
||||||
Inherits ClsClaseBase
|
Inherits ClsClaseBase
|
||||||
@@ -181,4 +182,32 @@ Public Class ClsTSoft
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#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
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user