Пример #1
0
        private void setPropertiesClick(object sender, RoutedEventArgs e)
        {
            AttractionProperties ap = new AttractionProperties(true);

            resetProps(ap);
            ap.ShowDialog();
            if (ap.AttractionReturned != null)
            {
                attrationName.Text = ap.AttractionReturned;
            }
            if (ap.ContinentReturned != null)
            {
                continentName.Text = ap.ContinentReturned;
            }
            if (ap.CountryReturned != null)
            {
                countryName.Text = ap.CountryReturned;
            }
            if (ap.CityReturned != null)
            {
                cityName.Text = ap.CityReturned;
            }
            if (ap.TypeReturned != null)
            {
                typeName.Text = ap.TypeReturned;
            }
            if (ap.City_code != null)
            {
                city_code = ap.City_code;
            }
        }
Пример #2
0
 private void resetProps(AttractionProperties ap)
 {
     ap.AttractionReturned = null;
     ap.ContinentReturned  = null;
     ap.CountryReturned    = null;
     ap.CityReturned       = null;
     ap.TypeReturned       = null;
     ap.City_code          = null;
 }
        private void filterClick(object sender, RoutedEventArgs e)
        {
            AttractionProperties ap = new AttractionProperties(false);

            ap.AttractionReturned = null;
            ap.TypeReturned       = null;
            ap.City_code          = null;
            ap.ShowDialog();
            if (ap.AttractionReturned != null)
            {
                attractionName = ap.AttractionReturned;
            }
            if (ap.TypeReturned != null)
            {
                type = ap.TypeReturned;
            }
            if (ap.City_code != null)
            {
                city_code = ap.City_code;
            }
            bindAttractions();
        }