public void Rental_Load()//code to show data of movie in DGV of movie// { DGV_rental.DataSource = null; try { DGV_rental.DataSource = Obj_Data.FillRental_Data(); DGV_rental.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Rented_out_Click(object sender, EventArgs e)//code to load the data of rentaled out in its DGV// { 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); } }