private void cancelFlight_btn_Click(object sender, EventArgs e) { if (currSysTime_DTP.Value > upcoming_selected_dept.AddDays(-1)) { //flight within 24 hours cannot cancel MessageBox.Show("Flight takes off in 24 hours cannot cancel"); } else { //cancel in userhistid Console.WriteLine("cancelling the booking"); FormDatabaseHelper.cancelBooking(upcoming_selectedID_ufh); populateUpcomingFlightsGrid(upcomingFlights_datagridview); } }