Exemple #1
0
        static public void GetCollectionsFromDatabase(ComboBox addLinksCb, ComboBox searchCb, ComboBox videosCb, ComboBox delete)
        {
            MySqlDataReader reader = DBconnection.ExecuteReader("SELECT * FROM collection ORDER BY collectionId ASC;");

            collections.Clear();

            while (reader.Read())
            {
                Collection collection = new Collection(reader.GetInt64(0), reader.GetString(1));
                collections.Add(collection);
            }

            reader.Close();

            AddCollectionToBoxes(addLinksCb, searchCb, videosCb, delete);
        }
Exemple #2
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     DBconnection.EndConnection();
 }