1er commit
prueba 1 con gitignore
This commit is contained in:
70
App_Code/VBCode/Clasi3.vb
Normal file
70
App_Code/VBCode/Clasi3.vb
Normal file
@@ -0,0 +1,70 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Web
|
||||
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Public Class Clasi3
|
||||
|
||||
Public Shared Function GetTipoFunebres(ByVal id As Integer) As SqlDataReader
|
||||
GetTipoFunebres = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
|
||||
db.RunProcedure("sp_Fun_Tipos", New SqlParameter() {db.MakeParameter("@i", id)}, GetTipoFunebres)
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function GetFunebres(ByVal f1 As String, ByVal f2 As String, ByVal id As Integer) As SqlDataReader
|
||||
GetFunebres = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
|
||||
db.RunProcedure("sp_Fun_nombres", _
|
||||
New SqlParameter() {db.MakeParameter("@f1", f1), db.MakeParameter("@f2", f2), _
|
||||
db.MakeParameter("@i", id)}, GetFunebres)
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function CheckFunebres(ByVal f1 As String, ByVal f2 As String) As SqlDataReader
|
||||
CheckFunebres = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
db.RunProcedure("sp_Fun_Check", _
|
||||
New SqlParameter() {db.MakeParameter("@f1", f1), db.MakeParameter("@f2", f2)}, CheckFunebres)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetDesplegado(ByVal f1 As String, ByVal f2 As String, ByVal id As Integer, _
|
||||
ByVal apellido As String, ByVal nombre As String) As SqlDataReader
|
||||
GetDesplegado = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
|
||||
db.RunProcedure("sp_Fun_Desplegado_nuevo", _
|
||||
New SqlParameter() {db.MakeParameter("@f1", f1), db.MakeParameter("@f2", f2), _
|
||||
db.MakeParameter("@i", id), db.MakeParameter("@apellido", apellido), _
|
||||
db.MakeParameter("@nombre", nombre)}, GetDesplegado)
|
||||
Return GetDesplegado
|
||||
End Function
|
||||
|
||||
Public Shared Function CheckFunebresNuevo(ByVal fecha As String, ByVal int_tipo As Integer, ByVal int_diario As Integer, ByVal web As Boolean) As SqlDataReader
|
||||
CheckFunebresNuevo = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
db.RunProcedure("sp_funeavisos", _
|
||||
New SqlParameter() {db.MakeParameter("@fecha", fecha), db.MakeParameter("@int_tipo", int_tipo), db.MakeParameter("@int_diario", int_diario), db.MakeParameter("@web", web)}, CheckFunebresNuevo)
|
||||
End Function
|
||||
|
||||
Public Shared Function VerListado(ByVal fecha As String, ByVal int_tipo As Integer, ByVal int_diario As Integer) As SqlDataReader
|
||||
VerListado = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_clasi3")
|
||||
Dim DReader As SqlDataReader = Nothing
|
||||
db.RunProcedure("sp_funelistado", New SqlParameter() {db.MakeParameter("@fecha", fecha), db.MakeParameter("@int_tipo", int_tipo), db.MakeParameter("@int_diario", int_diario)}, VerListado)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
362
App_Code/VBCode/Database.vb
Normal file
362
App_Code/VBCode/Database.vb
Normal file
@@ -0,0 +1,362 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Configuration
|
||||
|
||||
|
||||
|
||||
Public Class Database
|
||||
Implements IDisposable
|
||||
|
||||
#Region "Private Fields"
|
||||
'connection to data source
|
||||
Private con As SqlConnection
|
||||
Private str_con As String = System.Configuration.ConfigurationManager.AppSettings("con_ed1") 'default
|
||||
'Error Message field
|
||||
Private _errorMessage As String
|
||||
'latest exception
|
||||
Private _exception As System.Exception
|
||||
#End Region
|
||||
|
||||
#Region "Public Properties"
|
||||
|
||||
Public ReadOnly Property ErrorMessage() As String
|
||||
Get
|
||||
Return _errorMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LastException() As System.Exception
|
||||
Get
|
||||
Return _exception
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property ConString() As String
|
||||
Get
|
||||
Return str_con
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
str_con = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ConnectionString() As String
|
||||
Get
|
||||
'Return System.Configuration.ConfigurationSettings.AppSettings("Database.DEFAULT_CONNECTION_STRING")
|
||||
Return str_con ''System.Configuration.ConfigurationManager.AppSettings("conn")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public Method Implementations"
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This function takes a stored proc name and returns an integer '
|
||||
'by invoking ExecuteScalar() on the SqlCommand type instance '
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Function RunProcedure(ByVal procName As String) As Integer
|
||||
Dim result As Integer
|
||||
Dim cmd As SqlCommand
|
||||
Try
|
||||
cmd = CreateCommand(procName, Nothing)
|
||||
result = CType(cmd.ExecuteScalar(), Integer)
|
||||
Catch e As Exception
|
||||
result = -1
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Finally
|
||||
Me.Close()
|
||||
End Try
|
||||
|
||||
Return result
|
||||
|
||||
End Function
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This function takes a stored proc name, sql parameters returns an integer '
|
||||
'by invoking ExecuteScalar() on the SqlCommand type instance '
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Function RunProcedure(ByVal procName As String, ByVal prams As SqlParameter()) As Integer
|
||||
Dim result As Integer
|
||||
Dim cmd As SqlCommand
|
||||
|
||||
Try
|
||||
|
||||
cmd = CreateCommand(procName, prams)
|
||||
result = CInt(cmd.ExecuteScalar())
|
||||
|
||||
Catch e As Exception
|
||||
result = -1
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
|
||||
Finally
|
||||
Me.Close()
|
||||
|
||||
End Try
|
||||
|
||||
Return result
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RunProcstring(ByVal procName As String, ByVal prams As SqlParameter()) As String
|
||||
Dim result As String
|
||||
Dim cmd As SqlCommand
|
||||
Try
|
||||
cmd = CreateCommand(procName, prams)
|
||||
result = CStr(cmd.ExecuteScalar())
|
||||
Catch e As Exception
|
||||
result = ""
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Finally
|
||||
Me.Close()
|
||||
End Try
|
||||
Return result
|
||||
End Function
|
||||
|
||||
Public Function RunProcBool(ByVal procName As String, ByVal prams As SqlParameter()) As Boolean
|
||||
Dim result As Boolean
|
||||
Dim cmd As SqlCommand
|
||||
Try
|
||||
cmd = CreateCommand(procName, prams)
|
||||
result = CBool(cmd.ExecuteScalar())
|
||||
Catch e As Exception
|
||||
result = False
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Finally
|
||||
Me.Close()
|
||||
End Try
|
||||
Return result
|
||||
End Function
|
||||
|
||||
Public Function RunProcBool(ByVal procName As String) As Boolean
|
||||
Dim result As Boolean
|
||||
Dim cmd As SqlCommand
|
||||
Try
|
||||
cmd = CreateCommand(procName, Nothing)
|
||||
result = CBool(cmd.ExecuteScalar())
|
||||
Catch e As Exception
|
||||
result = False
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Finally
|
||||
Me.Close()
|
||||
End Try
|
||||
Return result
|
||||
End Function
|
||||
|
||||
|
||||
Public Function RunProcDate(ByVal procName As String, ByVal prams As SqlParameter()) As Date
|
||||
Dim result As Date
|
||||
Dim cmd As SqlCommand
|
||||
|
||||
Try
|
||||
|
||||
cmd = CreateCommand(procName, prams)
|
||||
result = CDate(cmd.ExecuteScalar())
|
||||
|
||||
Catch e As Exception
|
||||
result = CDate("1000/01/01")
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
|
||||
Finally
|
||||
Me.Close()
|
||||
|
||||
End Try
|
||||
|
||||
Return result
|
||||
|
||||
End Function
|
||||
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This method takes a stored proc name and a SqlDataReader (BY REF) and returns the results '
|
||||
'in the same DataReader that you pass in as ref. This invokes ExecuteReader on SqlCommand type'
|
||||
'instance '
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Sub RunProcedure(ByVal procName As String, ByRef dataReader As SqlDataReader)
|
||||
Dim cmd As SqlCommand
|
||||
Try
|
||||
cmd = CreateCommand(procName, Nothing)
|
||||
dataReader = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
|
||||
|
||||
Catch e As Exception
|
||||
dataReader = Nothing
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Me.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This method takes a stored proc name, Sql Parameters and a SqlDataReader (BY REF) and '
|
||||
'returns the results in the same DataReader that you pass in as ref. This invokes ExecuteReader'
|
||||
'on SqlCommand type instance '
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Sub RunProcedure(ByVal procName As String, ByVal prams As SqlParameter(), ByRef dataReader As SqlDataReader)
|
||||
Dim cmd As SqlCommand
|
||||
''Dim dr As SqlDataReader
|
||||
Try
|
||||
cmd = CreateCommand(procName, prams)
|
||||
dataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
|
||||
|
||||
Catch e As Exception
|
||||
dataReader = Nothing
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
Me.Close()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This method takes a stored proc name, Sql Parameters and a DataSet ByRef '
|
||||
'In case of an exception returns a Nothing and ErrorMessage '
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Sub RunProcedure(ByVal procName As String, ByVal prams As SqlParameter(), ByRef ds As DataSet)
|
||||
Dim cmd As SqlCommand
|
||||
Dim adapter As SqlDataAdapter
|
||||
Try
|
||||
cmd = CreateCommand(procName, prams)
|
||||
adapter = New SqlDataAdapter(cmd)
|
||||
adapter.Fill(ds)
|
||||
Catch e As Exception
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
ds = Nothing
|
||||
Finally
|
||||
adapter = Nothing
|
||||
Me.Close()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
'This method takes a stored proc name and a Dataset by Ref '
|
||||
'In case of an exception returns a Nothing and ErrorMessage '
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Public Sub RunProcedure(ByVal procName As String, ByRef ds As DataSet)
|
||||
|
||||
Dim cmd As SqlCommand
|
||||
Dim adapter As SqlDataAdapter
|
||||
|
||||
Try
|
||||
cmd = CreateCommand(procName, Nothing)
|
||||
adapter = New SqlDataAdapter(cmd)
|
||||
adapter.Fill(ds)
|
||||
Catch e As Exception
|
||||
_errorMessage = e.Message
|
||||
_exception = e
|
||||
ds = Nothing
|
||||
Finally
|
||||
adapter = Nothing
|
||||
Me.Close()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function MakeParameter(ByVal ParamName As String, ByVal Value As Object) As SqlParameter
|
||||
Dim param As SqlParameter
|
||||
|
||||
param = New SqlParameter(ParamName, Value)
|
||||
|
||||
Return param
|
||||
|
||||
End Function
|
||||
|
||||
Public Function MakeParameter(ByVal ParamName As String, ByVal Direction As ParameterDirection, Optional ByVal Value As Object = Nothing) As SqlParameter
|
||||
Dim param As SqlParameter
|
||||
|
||||
param = New SqlParameter(ParamName, Value)
|
||||
param.Direction = Direction
|
||||
|
||||
Return param
|
||||
|
||||
End Function
|
||||
|
||||
Public Function MakeParameter(ByVal ParamName As String, ByVal DBType As SqlDbType, ByVal Size As Integer, ByVal Value As Object) As SqlParameter
|
||||
Dim param As SqlParameter
|
||||
|
||||
param = New SqlParameter(ParamName, DBType, Size)
|
||||
param.Value = Value
|
||||
|
||||
Return param
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub Close()
|
||||
If (con Is Nothing) Then
|
||||
Else
|
||||
con.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
|
||||
If (con Is Nothing) Then
|
||||
Else
|
||||
con.Dispose()
|
||||
con = Nothing
|
||||
End If
|
||||
'Suppress the finalization process
|
||||
System.GC.SuppressFinalize(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Method Implementations"
|
||||
|
||||
Private Function CreateCommand(ByVal procName As String, ByVal prams As SqlParameter()) As SqlCommand
|
||||
|
||||
Dim cmd As SqlCommand
|
||||
Dim parameter As SqlParameter
|
||||
|
||||
Call Open()
|
||||
|
||||
cmd = New SqlCommand(procName, con)
|
||||
|
||||
cmd.CommandType = CommandType.StoredProcedure
|
||||
|
||||
If (prams Is Nothing) Then
|
||||
Else
|
||||
For Each parameter In prams
|
||||
cmd.Parameters.Add(parameter)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Return cmd
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub Open()
|
||||
If (con Is Nothing) Then
|
||||
|
||||
con = New SqlConnection(str_con)
|
||||
Try
|
||||
con.Open()
|
||||
Catch ex As Exception
|
||||
_errorMessage = ex.Message
|
||||
End Try
|
||||
|
||||
Else
|
||||
If ((con.State = ConnectionState.Closed) Or (con.State = ConnectionState.Broken)) Then
|
||||
con.Open()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
22
App_Code/VBCode/Posts.vb
Normal file
22
App_Code/VBCode/Posts.vb
Normal file
@@ -0,0 +1,22 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Public Class Posts
|
||||
Public Shared Function TituloBlog(ByVal blog As Integer) As String
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_blogs")
|
||||
Return db.RunProcstring("sp_blogtitulo", New SqlParameter() {db.MakeParameter("@blog", blog)})
|
||||
End Function
|
||||
|
||||
Public Shared Function Listado_posts() As SqlDataReader
|
||||
Listado_posts = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_blogs")
|
||||
db.RunProcedure("sp_listado_posts_extra", Listado_posts)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
30
App_Code/VBCode/admin.vb
Normal file
30
App_Code/VBCode/admin.vb
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
213
App_Code/VBCode/elecciones.vb
Normal file
213
App_Code/VBCode/elecciones.vb
Normal file
@@ -0,0 +1,213 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Web
|
||||
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Public Class elecciones
|
||||
Public Shared Function LeoBancasDiputadosNac() As SqlDataReader
|
||||
LeoBancasDiputadosNac = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
db.RunProcedure("spel_bancasDiputadosNac", LeoBancasDiputadosNac)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoBancasSenadoresNac() As SqlDataReader
|
||||
LeoBancasSenadoresNac = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
db.RunProcedure("spel_bancasSenadoresNac", LeoBancasSenadoresNac)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoTotalBancasDiputadosNac() As SqlDataReader
|
||||
LeoTotalBancasDiputadosNac = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
db.RunProcedure("spel_totalbancasDiputadosNac", LeoTotalBancasDiputadosNac)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoTotalBancasSenadoresNac() As SqlDataReader
|
||||
LeoTotalBancasSenadoresNac = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
db.RunProcedure("spel_totalbancasSenadoresNac", LeoTotalBancasSenadoresNac)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosProvincias(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosProvincias = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaprov_2015f", parameters, LeoResultadosProvincias)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosMunicipios(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosMunicipios = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapamuni_2015f", parameters, LeoResultadosMunicipios)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosMunicipiosGobe(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosMunicipiosGobe = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapamuni_2015fGobe", parameters, LeoResultadosMunicipiosGobe)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosMunicipiosLista(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosMunicipiosLista = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapamuni_2015", parameters, LeoResultadosMunicipiosLista)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosProvinciasGobe(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosProvinciasGobe = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaprov_2015fGobe", parameters, LeoResultadosProvinciasGobe)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoTotalVotosPais() As Integer
|
||||
LeoTotalVotosPais = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Return db.RunProcedure("spel_totalvotos_2015_presi")
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoVotosDistrito(codeleccion As Int32, coddistrito As String) As Integer
|
||||
LeoVotosDistrito = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Return db.RunProcedure("spel_LeoVotosDistrito_2015", New SqlParameter() {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@coddistrito", coddistrito)})
|
||||
End Function
|
||||
Public Shared Function LeoVotosMunicipio(codeleccion As Int32, codmunicipio As String) As Integer
|
||||
LeoVotosMunicipio = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Return db.RunProcedure("spel_LeoVotosMunicipio_2015", New SqlParameter() {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@codmunicipio", codmunicipio)})
|
||||
End Function
|
||||
Public Shared Function LeoTotalVotosBA() As Integer
|
||||
LeoTotalVotosBA = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Return db.RunProcedure("spel_votosBA_2015_presi")
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoTotalVotosBAGobe() As Integer
|
||||
LeoTotalVotosBAGobe = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Return db.RunProcedure("spel_votosBA_2015_gobe")
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function LeoResultadosConu(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosConu = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaConu_2015f", parameters, LeoResultadosConu)
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function LeoResultadosBA(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosBA = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaBA_2015f", parameters, LeoResultadosBA)
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function LeoResultadosBAGobe(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosBAGobe = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaBA_2015fGobe", parameters, LeoResultadosBAGobe)
|
||||
|
||||
End Function
|
||||
Public Shared Function PorcentajeEscrutado(tipoeleccion As Int32) As SqlDataReader
|
||||
PorcentajeEscrutado = Nothing
|
||||
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_porcentajeescrutado_2015", parameters, PorcentajeEscrutado)
|
||||
End Function
|
||||
Public Shared Function PorcentajeEscrutadoBA(tipoeleccion As Int32) As SqlDataReader
|
||||
PorcentajeEscrutadoBA = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_porcentajeescrutadoBA_2015", parameters, PorcentajeEscrutadoBA)
|
||||
End Function
|
||||
Public Shared Function LeoResultadosProvinciasLista(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosProvinciasLista = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaprov_2015", parameters, LeoResultadosProvinciasLista)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosBALista(tipoeleccion As Int32) As SqlDataReader
|
||||
LeoResultadosBALista = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@tipoeleccion", tipoeleccion)}
|
||||
db.RunProcedure("spel_mapaBA_2015", parameters, LeoResultadosBALista)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosBALista(codeleccion As Int32, codmunicipio As String) As SqlDataReader
|
||||
LeoResultadosBALista = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@codmunicipio", codmunicipio)}
|
||||
db.RunProcedure("spel_cuadroBA_2015", parameters, LeoResultadosBALista)
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function LeoDistritos(codeleccion As Int32) As SqlDataReader
|
||||
LeoDistritos = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@codeleccion", codeleccion)}
|
||||
db.RunProcedure("spel_leodistritos_2015", parameters, LeoDistritos)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosxProvincia(codeleccion As Int32, coddistrito As String) As SqlDataReader
|
||||
LeoResultadosxProvincia = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@coddistrito", coddistrito)}
|
||||
db.RunProcedure("spel_cuadroprov_2015f", parameters, LeoResultadosxProvincia)
|
||||
|
||||
End Function
|
||||
Public Shared Function LeoResultadosxLista(codeleccion As Int32, coddistrito As String) As SqlDataReader
|
||||
LeoResultadosxLista = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@coddistrito", coddistrito)}
|
||||
db.RunProcedure("spel_cuadroprov_2015", parameters, LeoResultadosxLista)
|
||||
|
||||
End Function
|
||||
Public Shared Function PorcentajeEscrutadoxProvincia(codeleccion As Int32, coddistrito As String) As SqlDataReader
|
||||
PorcentajeEscrutadoxProvincia = Nothing
|
||||
Dim db As New Database
|
||||
db.ConString = System.Configuration.ConfigurationManager.AppSettings("con_elecciones")
|
||||
Dim parameters() As SqlParameter = {db.MakeParameter("@codeleccion", codeleccion), db.MakeParameter("@coddistrito", coddistrito)}
|
||||
db.RunProcedure("spel_porcentajeescrutadoprov_2015", parameters, PorcentajeEscrutadoxProvincia)
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
1198
App_Code/VBCode/func.vb
Normal file
1198
App_Code/VBCode/func.vb
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user