// Button 'All' in the room section // Display all room reservations private void buttonDisplayRoomAll_Click(object sender, EventArgs e) { // Fetch dataset DataSet roomreservationDS = DBGetData.GetRoomBookingDGVAll(1); if (roomreservationDS != null) { // No tables fetched if (roomreservationDS.Tables.Count == 0) { new StatusMessage("No datatable found, contact administrator."); return; } // No rows fetched else if (roomreservationDS.Tables[0].Rows.Count == 0) { new StatusMessage("No datarows found in table."); return; } // Clear labelStatus for previous messages else { new StatusMessage(""); } // Set the dataset as source for datagridview and make sure its displayed dataGridViewRoom.DataSource = roomreservationDS; dataGridViewRoom.DataMember = "Get_RR_All"; LoadDataGridViewRoom(); } }