Beispiel #1
0
        //code to show all rental movies in data grid view

        public void Rental_Load()
        {
            DGV_Rental.DataSource = null;
            try
            {
                DGV_Rental.DataSource = Obj_Data.FillRental_Data();
                DGV_Rental.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 //button for all rented out movies
 private void btn_rentedout_Click(object sender, EventArgs e)
 {
     DGV_Rental.DataSource = null;
     try
     {
         DGV_Rental.DataSource = Obj_Data.FillAll_Rented_out();
         DGV_Rental.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }