VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "c_usuariogrupo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Public Sub AgregarGrupoausuario(ByVal StrCodigoUsuario As String, ByVal StrCodigoGrupo As String, Optional VarAux As Variant)
Dim cmd As ADODB.Command
Dim con As ADODB.Connection
On Error GoTo ErrorHandler
  
  Set cmd = New ADODB.Command
  cmd.CommandText = "  SP_InsProcSE_USERGROUP '" & StrCodigoUsuario & "','" & StrCodigoGrupo & "'," & "1,0,0,0,0"
  
  Set con = New ADODB.Connection
  con.Open "FILEDSN=conexionsies"
  
  Set cmd.ActiveConnection = con
  cmd.Execute
  'GetObjectContext.SetComplete
Exit Sub
    
ErrorHandler:
Dim LStrMensajeError As String
Dim LVarNumeroError As Variant
    
     If Not cmd Is Nothing Then
        Set cmd = Nothing
     End If

     If Not con Is Nothing Then
        LStrMensajeError = con.Errors(con.Errors.Count - 2).Description
        LVarNumeroError = con.Errors(con.Errors.Count - 2).NativeError
        Set con = Nothing
     End If
     
     'GetObjectContext.SetAbort
     Err.Raise LVarNumeroError, "DB_SE_MANTENIMIENTOS.AgregarGrupoausuario", LStrMensajeError
     
End Sub

Public Sub borrargruposdelusuario(ByVal StrCodigoUsuario As String, Optional VarAux As Variant)
Dim cmd As ADODB.Command
Dim con As ADODB.Connection
On Error GoTo ErrorHandler
  Set cmd = New ADODB.Command
  cmd.CommandText = " SE_borrargruposdelusuarioProc '" & StrCodigoUsuario & "'"
  
  Set con = New ADODB.Connection
  con.Open "FILEDSN=conexionsies"
  
  Set cmd.ActiveConnection = con
  cmd.Execute
'GetObjectContext.SetComplete
Exit Sub
    
ErrorHandler:
Dim LStrMensajeError As String
Dim LVarNumeroError As Variant
    
     If Not cmd Is Nothing Then
        Set cmd = Nothing
     End If

     If Not con Is Nothing Then
        LStrMensajeError = con.Errors(con.Errors.Count - 2).Description
        LVarNumeroError = con.Errors(con.Errors.Count - 2).NativeError
        Set con = Nothing
     End If
     
     'GetObjectContext.SetAbort
     Err.Raise LVarNumeroError, "DB_SE_MANTENIMIENTOS.borrargruposdelusuario", LStrMensajeError
End Sub

Public Sub borrarusuariosdelGrupo(ByVal StrCodigoGrupo As String, Optional VarAux As Variant)
Dim cmd As ADODB.Command
Dim con As ADODB.Connection
On Error GoTo ErrorHandler
Set cmd = New ADODB.Command
cmd.CommandText = " SE_borrarusuariosdelgrupoProc '" & StrCodigoGrupo & "'"

Set con = New ADODB.Connection
con.Open "FILEDSN=conexionsies"

Set cmd.ActiveConnection = con
cmd.Execute

'GetObjectContext.SetComplete

Exit Sub
    
ErrorHandler:
Dim LStrMensajeError As String
Dim LVarNumeroError As Variant
    
     If Not cmd Is Nothing Then
        Set cmd = Nothing
     End If

     If Not con Is Nothing Then
        LStrMensajeError = con.Errors(con.Errors.Count - 2).Description
        LVarNumeroError = con.Errors(con.Errors.Count - 2).NativeError
        Set con = Nothing
     End If
     
     'GetObjectContext.SetAbort
     Err.Raise LVarNumeroError, "DB_SE_MANTENIMIENTOS.borrarusuariosdelGrupo", LStrMensajeError
     
End Sub

Public Function Auxiliar1(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar1", Err.Description
End Function

Public Function Auxiliar2(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar2", Err.Description
End Function

Public Function Auxiliar3(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar3", Err.Description
End Function

Public Function Auxiliar4(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar4", Err.Description
End Function

Public Function Auxiliar5(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar5", Err.Description
End Function


Public Function Auxiliar6(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar6", Err.Description
End Function

Public Function Auxiliar7(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar7", Err.Description
End Function

Public Function Auxiliar8(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar8", Err.Description
End Function

Public Function Auxiliar9(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar9", Err.Description
End Function

Public Function Auxiliar10(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    'GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    'GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_SE_MANTENIMIENTOS.c_usuariogrupo.Auxiliar10", Err.Description
End Function





