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

            dr = frm.ShowDialog();
            if (dr == DialogResult.OK)
            {
                MessageBox.Show("Main: ChangeSong: 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: ChangeSong: User clicked Cancel button");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ChangeSongButton_Click(object sender, EventArgs e)
        {
            DialogResult dr = new DialogResult();
            ChangeSongWF frm = new ChangeSongWF();

            dr = frm.ShowDialog();
            if (dr == DialogResult.OK)
            {
                MessageBox.Show("Main: ChangeSong: 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: ChangeSong: User clicked Cancel button");
            }
        }