Example #1
0
        /// <summary>
        /// List the shows in the database into an IPodcasterComboBox
        /// </summary>
        /// <param name="ipcb">Combo box to populate</param>
        public void ListShows(IPodcasterComboBox ipcb)
        {
            Connect();

            SQLiteDataAdapter da = new SQLiteDataAdapter("SELECT ROWID, * FROM Shows", conn);
            DataTable dt = new DataTable();
            da.Fill(dt);
            conn.Close();

            ipcb.SetDataSource(dt, "Name", "ROWID");
        }
Example #2
0
 /// <summary>
 /// Populate a combo box with active shows.
 /// </summary>
 /// <param name="kcb">A combo box that implements IKLIKComboBox</param>
 public static void ListShows(IPodcasterComboBox kcb)
 {
     CoreInstances.Database.ListShows(kcb);
 }
Example #3
0
        /// <summary>
        /// Load currently active shows.
        /// </summary>
        /// <returns>A DataTable representing currently active shows.</returns>
        public void ListShows(IPodcasterComboBox ipcb)
        {
            Connect();

            MySqlDataAdapter adapter = new MySqlDataAdapter("SELECT * FROM `Shows` WHERE `Active`=1 ORDER BY `Title`", conn);
            DataTable dt = new DataTable();
            adapter.Fill(dt);

            conn.Close();

            ipcb.SetDataSource(dt, "Title", "ID");
        }