private void toolStripButtonDelete_Click(object sender, EventArgs e) // deletes seleted guest & booking from the Database8 { DatabaseCalls.DeleteGuest(txtName.Text); DatabaseCalls.DeleteBooking(Convert.ToInt32(lblBookingID.Text)); ShowGuestsandBooking(); Cleartxtboxes(); }
private void tsbtnDelete_Click(object sender, EventArgs e)//deltes a guest and booking that is selected { if (lblBookingID.Text == "BookingID" || lblName.Text == "Name") { MessageBox.Show("Please select a guest to Delete"); } else { DatabaseCalls.DeleteGuest(lblName.Text); DatabaseCalls.DeleteBooking(Convert.ToInt16(lblBookingID.Text)); } }