Example #1
0
 // Delete Button Click
 private void mainDeleteButton_Click(object sender, EventArgs e)
 {
     // Check that selected row is valid
     if (selectedAppointmentID != -1)
     {
         // Delete appointment
         DataInterface.deleteAppoinment(selectedAppointmentID);
     }
     else
     {
         // If not valid, display message
         MessageBox.Show("Please select a customer to delete and try again.");
     }
     // Refresh appointment data
     displayAppointments();
 }