Cursos tema en uso

This commit is contained in:
Rakcsle Supertramp
2020-08-15 15:03:25 -07:00
parent 79ba735aa1
commit 864481ab24
2 changed files with 34 additions and 25 deletions

View File

@@ -4157,12 +4157,22 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch exs As SqlException
If exs.ErrorCode = -2146232060 Then
Catch exs As SqlException
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
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
@@ -6859,25 +6869,26 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
End Function
#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
' 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).

View File

@@ -101,9 +101,8 @@ Partial Class RH_CatCursosTemas
If objRH.TemasRemove(CveTema) Then
CargadatosGvTemas()
LoadComboTemas()
Alert("Tema elimino correctamente ", TipoMensaje.MsgInformacion)
Else
Alert("Ocurrio un error al eliminar el tema", TipoMensaje.MsgError)
Alert("Tema elimino correctamente ", TipoMensaje.MsgInformacion)
End If
End Sub
@@ -179,9 +178,8 @@ 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)
Alert("Subtema Elimino Correctamente.", TipoMensaje.MsgInformacion)
End If
LoadComboTemas()
CargadatosGvSubtemas()