Option Strict On

Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web

Imports Microsoft.VisualBasic

Public Class admin


    Public Shared Function Grabarsesiones(ByVal generador As String, ByVal pagina As String, ByVal dirIP As String) As Integer
        Dim db As New Database
        Return db.RunProcedure("sp_grabarsesiones", New SqlParameter() {db.MakeParameter("@generador", generador), db.MakeParameter("@pagina", pagina), db.MakeParameter("@dirIP", dirIP)})
    End Function

    Public Shared Function Errores(ByVal str_error As String) As Integer
        Dim admin_errores As String = System.Configuration.ConfigurationManager.AppSettings("admin_errores")
        If admin_errores = "no" Then
            Return 0           
        Else
            Dim db As New Database
            Return db.RunProcedure("sp_errores", New SqlParameter() {db.MakeParameter("@error", str_error)})
        End If

    End Function

End Class
