Beispiel #1
0
 private void Btn_allMovie_Click(object sender, EventArgs e)
 {
     DGV_Rentmovie.DataSource = null;
     try
     {
         // select the view form the database
         string queryObj = "Select * from allMovie";
         //calling  the FillDGV class
         DGV_Rentmovie.DataSource = obj_Database.FillDGV(queryObj);
         // To resize the data grid view
         DGV_Rentmovie.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 private void Btn_rentoutM_Click(object sender, EventArgs e)
 {
     //When click the button make it null
     DGV_Rentmovie.DataSource = null;
     try
     {
         // select the view form the database
         string queryObj = "Select * from ReturnOuts";
         DGV_Rentmovie.DataSource = obj_Database.FillDGV(queryObj);
         // To resize the data grid view
         DGV_Rentmovie.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }