private void btnViewTicket_Click(object sender, EventArgs e)
 {
     if (lsbTickets.SelectedItem != null)
     {
         TicketForm ticketForm = new TicketForm(ticket);
         ticketForm.Show();
     }
     if (lsbTickets.SelectedItem == null)
     {
         MessageBox.Show("You did not select a ticket!", "Error!");
     }
 }
Esempio n. 2
0
 private void btnViewTicket_Click(object sender, EventArgs e)
 {
     try
     {
         TicketForm ticketForm = new TicketForm(ticket);
         ticketForm.Show();
     }
     catch
     {
         MessageBox.Show("Please select a ticket to view.", "Error");
     }
 }