public void Updatebtn_Click(object sender, RoutedEventArgs e)
        {
            if (tb_name.Text == "" || tb_seat.Text == "")
            {
                MessageBox.Show("All fields are required to update details", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            else
            {
                var update = MessageBox.Show("Would you like to update the data??", "Update Data", MessageBoxButton.YesNo, MessageBoxImage.Question);
                if (update == MessageBoxResult.Yes)
                {
                    if (Airline1.IsChecked == true)
                    {
                        rb_Airline = "Airbus A380";
                    }
                    else if (Airline2.IsChecked == true)
                    {
                        rb_Airline = "Boeing 777";
                    }
                    else
                    {
                        rb_Airline = "Boeing 747-8";
                    }

                    if (Meal1.IsChecked == true)
                    {
                        rb_Meal = "Veg";
                    }
                    else if (Meal2.IsChecked == true)
                    {
                        rb_Meal = "Non-Veg";
                    }
                    else
                    {
                        rb_Meal = "Mexican";
                    }

                    airline air = new airline(airline_list.SelectedIndex, tb_name.Text, rb_Airline, int.Parse(tb_seat.Text), rb_Meal);
                    a[airline_list.SelectedIndex] = air;

                    var upd = from up in a
                              select up.Name;
                    airline_list.DataContext = upd;

                    tb_name.Clear();
                    tb_seat.Clear();
                    MessageBox.Show("Details have been successfully Updated!!!", "Data Updated", MessageBoxButton.OK, MessageBoxImage.Information);
                }
            }
        }
        private void Update_Click(object sender, RoutedEventArgs e)
        {
            var update = MessageBox.Show("Would you like to update the data??", "Update Data", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (update == MessageBoxResult.Yes)
            {
                airline air = new airline(airline_list.SelectedIndex, tb_name.Text, rb_Airline, int.Parse(tb_seat.Text), rb_Meal);
                a[airline_list.SelectedIndex] = air;

                var up = from upd in a
                         select upd.Name;
                airline_list.DataContext = up;
                tb_name.Clear();
                tb_seat.Clear();
                MessageBox.Show("Details have been successfully Updated!!!", "Data Updated", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }