Example #1
0
        private void libCity_Click(object sender, EventArgs e)
        {
            try
            {
                libBookingID.Items.Clear();

                List <string> bookingIDs = new List <string>();
                List <string> status     = new List <string>();
                string        adress     = libCity.SelectedItem.ToString();

                bookingIDs = CC.GetBookingID(adress);
                status     = CC.GetStatus(adress);
                int i = 0;
                foreach (string s in bookingIDs)
                {
                    libBookingID.Items.Add(s + ", " + status[i]);
                    i++;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Connection error");
            }
        }