cierre completo de las ventanas
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SQLite;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
@@ -76,6 +77,31 @@ namespace compabetov2.database
|
||||
}
|
||||
}
|
||||
|
||||
public static SQLiteDataReader conseguirInicioSesionDAO(string usuario)
|
||||
{
|
||||
SQLiteDataReader reader = null;
|
||||
var db_conexion = new Conexion();
|
||||
try
|
||||
{
|
||||
SQLiteConnection conexion = db_conexion.get_connection();
|
||||
|
||||
conexion.Open();
|
||||
|
||||
string sql = "SELECT usuario, tipo FROM Login WHERE usuario = @param0";
|
||||
SQLiteCommand command = new SQLiteCommand(sql, conexion);
|
||||
command.Parameters.AddWithValue($"@param{0}", usuario);
|
||||
reader = command.ExecuteReader();
|
||||
|
||||
return reader;
|
||||
|
||||
}
|
||||
catch (SQLiteException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return reader;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool verificarExistenciaLoginDAO(LoginModel loginModel)
|
||||
{
|
||||
SQLiteDataReader reader = null;
|
||||
|
||||
Reference in New Issue
Block a user