private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (this.Visibility == Visibility.Collapsed)
            {
                DependencyObject ucParent = this.Parent;

                if (!(ucParent is UserControl))
                {
                    ucParent = LogicalTreeHelper.GetParent(ucParent);
                }

                scheduleMng parent = (scheduleMng)ucParent;
                parent.loadAirportData();
            }
        }
        private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            DependencyObject ucParent = this.Parent;

            if (!(ucParent is UserControl))
            {
                ucParent = LogicalTreeHelper.GetParent(ucParent);
            }

            parent = (scheduleMng)ucParent;

            if (this.Visibility == Visibility.Visible)
            {
                txtMaSB.Text           = GlobalItem.selectedAirport.MaSB;
                txtTenSB.Text          = GlobalItem.selectedAirport.TenSB;
                txtDiaDiem.Text        = GlobalItem.selectedAirport.DiaDiem;
                lblSBTitle.Content     = "Sân bay " + txtTenSB.Text;
                lblTitleOfData.Content = "Danh sách các chuyến bay bắt đầu/kết thúc ở " + txtTenSB.Text;

                dataChuyenBay.ItemsSource = AirportController.searchCBForMASB(txtMaSB.Text);

                if (parent.isEditting)
                {
                    manChe.Visibility = Visibility.Hidden;
                }
                else
                {
                    manChe.Visibility = Visibility.Visible;
                }
            }
            else
            {
                parent.isEditting          = false;
                GlobalItem.selectedAirport = null;
                parent.loadAirportData();
            }
        }