Cursos tema en uso
This commit is contained in:
@@ -4158,11 +4158,21 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch exs As SqlException
|
||||
If exs.ErrorCode = -2146232060 Then
|
||||
|
||||
|
||||
If exs.Message.Contains("Número: 547;") Then
|
||||
OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
|
||||
|
||||
'If exs.ErrorCode = -2146232060 Then
|
||||
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'Else
|
||||
' OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
@@ -6864,20 +6874,21 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
#End Region
|
||||
|
||||
|
||||
Public msgsError As New StringBuilder()
|
||||
Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
msgsError.AppendLine(Mensaje)
|
||||
msgsError.Append("<br/>")
|
||||
'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
|
||||
'Public msgsError As New StringBuilder()
|
||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
' msgsError.AppendLine(Mensaje)
|
||||
' msgsError.Append("<br/>")
|
||||
' '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
|
||||
|
||||
#Region " IDisposable Support "
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
If msgsError.ToString().Length > 0 Then
|
||||
Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
||||
End If
|
||||
'If msgsError.ToString().Length > 0 Then
|
||||
' Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
||||
'End If
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
' TODO: Liberar otro estado (objetos administrados).
|
||||
|
||||
@@ -102,8 +102,7 @@ Partial Class RH_CatCursosTemas
|
||||
CargadatosGvTemas()
|
||||
LoadComboTemas()
|
||||
Alert("Tema elimino correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al eliminar el tema", TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -180,8 +179,7 @@ Partial Class RH_CatCursosTemas
|
||||
If objRH.SubtemaRemove(CveTema) Then
|
||||
CargadatosGvTemas()
|
||||
Alert("Subtema Elimino Correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Eliminar el Subtema.", TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
LoadComboTemas()
|
||||
CargadatosGvSubtemas()
|
||||
|
||||
Reference in New Issue
Block a user