private void ShowTickets()
 {
     if (fpnTickets.Controls.Count > 0)
     {
         fpnTickets.Controls.Clear();
     }
     tickets = new TicketBLL().RetrieveALL();
     TicketsPanel[] ticket = new TicketsPanel[tickets.Count];
     for (int i = 0; i < ticket.Length; i++)
     {
         ticket[i]           = new TicketsPanel(table.Size.Width, table.Size.Height);
         ticket[i].ID        = tickets[i].ID.ToString();
         ticket[i].Cinema    = "Cineflexx";
         ticket[i].BookingID = tickets[i].Booking.ID.ToString();
         ticket[i].Payment   = "CASH";
         ticket[i].Price     = tickets[i].Price.ToString() + " $";
         ticket[i].Date      = tickets[i].Date.ToString("dd-MM-yyyy");
         ticket[i].VAT       = tickets[i].VAT.ToString();
         fpnTickets.Controls.Add(ticket[i]);
     }
 }
        private void ShowTickets(string bookingid)
        {
            if (fpnTickets.Controls.Count > 0)
            {
                fpnTickets.Controls.Clear();
            }
            if (this.tickets == null)
            {
                this.tickets = new TicketBLL().RetrieveALL();
            }

            var all = this.tickets;

            List <Ticket> tickets = new List <Ticket>();

            foreach (var item in all)
            {
                if (System.Text.RegularExpressions.Regex.IsMatch(item.Booking.ID.ToString(), bookingid))
                {
                    tickets.Add(item);
                }
            }

            tickets = new TicketBLL().RetrieveALL();
            TicketsPanel[] ticket = new TicketsPanel[tickets.Count];
            for (int i = 0; i < ticket.Length; i++)
            {
                ticket[i]           = new TicketsPanel(table.Size.Width, table.Size.Height);
                ticket[i].ID        = tickets[i].ID.ToString();
                ticket[i].Cinema    = "Cineflexx";
                ticket[i].BookingID = tickets[i].Booking.ID.ToString();
                ticket[i].Payment   = "CASH";
                ticket[i].Price     = tickets[i].Price.ToString();
                ticket[i].Date      = tickets[i].Date.ToString("dd-MM-yyyy");
                ticket[i].VAT       = tickets[i].VAT.ToString();
                fpnTickets.Controls.Add(ticket[i]);
            }
        }