private void PopulateTextBoxes(int selectedRow) { var url = podcastController.GetPodcastUrl(selectedRow); txtUrl.Text = url; var name = podcastController.GetPodcastName(selectedRow); txtName.Text = name; var interval = podcastController.GetPodcastUpdateInterval(selectedRow); cbInterval.SelectedItem = interval; var category = podcastController.GetPodcastCategory(selectedRow); cbCategory.Text = category; }
//Lists all episodes from the selected podcast private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { LblPodEpi.Text = ""; LstEpisodes.Items.Clear(); FormHandler.ShowNewPodcastName(TxtNewPodName, BtnNewPodName); int selectedRow = PodcastFeed.CurrentCell.RowIndex; List <Episode> episodeList = podcastController.GetEpisodeList(selectedRow); foreach (var item in episodeList) { LstEpisodes.Items.Add(item.EpisodeName); } string url = podcastController.GetPodcastUrl(selectedRow); LblPodEpi.Text = handler.GetPodcastName(url); TxtURL.Text = url; CmbCat.SelectedItem = podcastController.GetPodcastCategory(selectedRow); CmbUpdateFreq.SelectedItem = podcastController.GetPodcastInterval(selectedRow); }