Esempio n. 1
0
        private void rentalHistoryBtn_Click_1(object sender, EventArgs e)
        {
            RentalInfoController rentalController = new RentalInfoController();

            rentalController.fillRentalHistoryDataGrid(rentalHistoryDataGrid);
            rentalHistoryDataGrid.Visible = true;
            allMovies.Visible             = false;
            rentedOnly.Visible            = false;
            showMovie3Btn.Visible         = false;
            showMovie2Btn.Visible         = true;

            if (this.rentalHistoryDataGrid.SelectedRows.Count > 0)
            {
                DataGridViewRow row = this.rentalHistoryDataGrid.SelectedRows[0];
                movie_IDTextBox.Text  = row.Cells[0].Value.ToString();
                movieTitleTextBx.Text = row.Cells[1].Value.ToString();
                rentedChkBx.Checked   = (bool)row.Cells[2].Value ? true : false;
            }

            //this.mOVIE_INFOTableAdapter.Fill(this.mOVIESDataSet1.MOVIE_INFO);
            //// TODO: This line of code loads data into the 'mOVIESDataSet.MOVIE_INFO' table. You can move, or remove it, as needed.
            //this.mOVIE_INFOTableAdapter.Fill(this.mOVIESDataSet.MOVIE_INFO);
            //// TODO: This line of code loads data into the 'mOVIESDataSet.RENTAL' table. You can move, or remove it, as needed.
            //this.rENTALTableAdapter.Fill(this.mOVIESDataSet.RENTAL);
        }
Esempio n. 2
0
        private void rentedOnlyBtn_Click(object sender, EventArgs e)
        {
            RentalInfoController rentalController = new RentalInfoController();

            rentalController.fillRentedOnly(rentedOnly);
            rentedOnly.Visible            = true;
            allMovies.Visible             = false;
            showMovie3Btn.Visible         = true;
            showMovie2Btn.Visible         = false;
            rentalHistoryDataGrid.Visible = false;
        }