Aerolinea.claseUsuario.Autentificar C# (CSharp) Method

Autentificar() public static method

public static Autentificar ( String txtUsuario, String txtContra ) : int
txtUsuario String
txtContra String
return int
        public static int Autentificar(String txtUsuario, String txtContra)
        {
            int resultado = -1;
            MySqlConnection conexion = clasconexion.funobtenerConexion();
            MySqlCommand comando = new MySqlCommand(String.Format("select * from MaUSUARIO where vuser = '{0}' and vpassword = '{1}' and vestado = 'ACTIVO'", txtUsuario, txtContra), conexion);
            MySqlDataReader reader = comando.ExecuteReader();

            while (reader.Read())
            {
                resultado = 50;
            }
            conexion.Close();
            return resultado;
        }