Esempio n. 1
0
        private void cmbBoxCustomers_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbBoxCustomers.Items.Count == 0)
            {
                return;
            }

            List <Reservation> reservations = reservationsService.getByCustomer((Customer)cmbBoxCustomers.SelectedItem);

            reservationsListView.Items.Clear();

            foreach (Reservation reservation in reservations)
            {
                reservationsListView.Items.Add(new ListViewItem()
                {
                    Text = reservation.ToString(),
                    Tag  = reservation
                });
            }
        }