コード例 #1
0
        internal Eventos Retrieve()
        {
            MySqlConnection con     = conect();
            MySqlCommand    command = con.CreateCommand();

            command.CommandText = "select * from Evento";

            con.Open();
            MySqlDataReader res = command.ExecuteReader();

            Eventos e = null;

            if (res.Read())
            {
                Debug.WriteLine("Recuperado: " + res.GetInt32(0) + " " + res.GetString(1) + " " + res.GetString(2) + " " + res.GetInt32(3) + " " + res.GetInt32(4));
                e = new Eventos(res.GetInt32(0), res.GetString(1), res.GetString(2), res.GetInt32(3), res.GetInt32(4));
            }



            return(e);
        }