Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DeleteSongButton_Click(object sender, EventArgs e)
        {
            DialogResult dr  = new DialogResult();
            DeleteSongWF frm = new DeleteSongWF();

            dr = frm.ShowDialog();
            if (dr == DialogResult.OK)
            {
                MessageBox.Show("Main: DeleteSong: User clicked OK button");
                this.songViewTableAdapter.Fill(this.cDCatalogDataSet1.SongView);

                // the following did not work with selecting a row and did not fill the entire grid (of course):
                // List<CDCatalogEF.Song> songList = Song.GetAllSongs();
                // this.songDataGridView.DataSource = songList;
            }
            else if (dr == DialogResult.Cancel)
            {
                MessageBox.Show("Main: DeleteSong: User clicked Cancel button");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DeleteSongButton_Click(object sender, EventArgs e)
        {
            DialogResult dr = new DialogResult();
            DeleteSongWF frm = new DeleteSongWF();

            dr = frm.ShowDialog();
            if (dr == DialogResult.OK)
            {
                MessageBox.Show("Main: DeleteSong: User clicked OK button");
                this.songViewTableAdapter.Fill(this.cDCatalogDataSet1.SongView);

                // the following did not work with selecting a row and did not fill the entire grid (of course):
                // List<CDCatalogEF.Song> songList = Song.GetAllSongs();
                // this.songDataGridView.DataSource = songList;
            }
            else if (dr == DialogResult.Cancel)
            {
                MessageBox.Show("Main: DeleteSong: User clicked Cancel button");
            }
        }