private void BtnAddOrUpdate_Click(object sender, EventArgs e) { if (FieldsAreValid()) { PopulateTicket(); TicketDB.AddOrUpdate(Ticket); } }
private void BtnDelete_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure you would like to delete this ticket?", "Confirm Deletion", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { TicketDB.Delete(Ticket); } }