public static Billet GetBillet(int id)
        {
            bdd.OpenConnection();
            string       query = "SELECT * FROM billet WHERE id = @id;";
            MySqlCommand cmd   = new MySqlCommand(query, bdd.GetConnection());

            cmd.Parameters.AddWithValue("@id", id);
            cmd.ExecuteNonQuery();
            MySqlDataReader reader = cmd.ExecuteReader();

            reader.Read();
            Billet Billet = new Billet(reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2), reader.GetDateTime(3));

            reader.Close();
            bdd.CloseConnection();
            return(Billet);
        }
        public static ObservableCollection <Billet> SelectBillets()
        {
            ObservableCollection <Billet> Billets = new ObservableCollection <Billet>();

            bdd.OpenConnection();
            string       query = "SELECT * FROM billet;";
            MySqlCommand cmd   = new MySqlCommand(query, bdd.GetConnection());

            cmd.ExecuteNonQuery();
            MySqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {
                Billet Billet = new Billet(reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2), reader.GetDateTime(3));
                Billets.Add(Billet);
            }
            reader.Close();
            bdd.CloseConnection();
            return(Billets);
        }
        public static ObservableCollection <Billet> SelectBilletsByClient(int client)
        {
            ObservableCollection <Billet> billets = new ObservableCollection <Billet>();

            bdd.OpenConnection();
            string       query = "SELECT * FROM billet Where user_id = @client;";
            MySqlCommand cmd   = new MySqlCommand(query, bdd.GetConnection());

            cmd.Parameters.AddWithValue("@client", client);
            cmd.ExecuteNonQuery();
            MySqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {
                Billet billet = new Billet(reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2), reader.GetDateTime(3));
                billets.Add(billet);
            }
            reader.Close();
            bdd.CloseConnection();
            return(billets);
        }