Exemplo n.º 1
0
 private void btnModifyDelete_Click(object sender, EventArgs e)
 {
     if (selectedMovie.Title != null)
     {
         // create the form object
         ModifyDelete modifyDeleteFrm = new ModifyDelete();
         modifyDeleteFrm.OpenForm(selectedMovie);
     }
     else
     {
         MessageBox.Show("A movie must be selected. Please select a movie.");
     }
 }
Exemplo n.º 2
0
        private void btnModifyDelete_Click(object sender, EventArgs e)
        {
            if (selectedMovie.Title != null)
            {
                // create the form object
                ModifyDelete modifyDeleteFrm = new ModifyDelete();
                modifyDeleteFrm.OpenForm(selectedMovie);
            }
            else
            {
                MessageBox.Show("A movie must be selected. Please select a movie.");
            }

            // this is used to create an auto-refresh effect
            // TODO: This line of code loads data into the 'movieDBDataSet.Movies' table. You can move, or remove it, as needed.
            this.moviesTableAdapter.FillBy1(this.movieDBDataSet.Movies);
            if (moviesDataGridView2.Rows.Count > 0)
            {
                moviesDataGridView2.Rows[0].Selected = true;         // this selects the first row
            }
        }