Beispiel #1
0
        public ActionResult GetAllCountries()
        {
            List <string> Countries = new List <string>();

            Countries = oWeatherHelper.GetCities(Server.MapPath(CITY_LIST_RELATIVE_PATH))
                        .Where(c => !string.IsNullOrEmpty(c.country))
                        .Select(c => c.country)
                        .Distinct()
                        .OrderBy(c => c).ToList <string>();
            return(Json(Countries, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public async void MakeQuery()
        {
            List <City> cities = await WeatherHelper.GetCities(Query);

            Cities.Clear();
            foreach (var city in cities)
            {
                Cities.Add(city);
            }
        }
Beispiel #3
0
        public async void MakeRequest()
        {
            var cities = await WeatherHelper.GetCities(Query);

            Cities.Clear();
            foreach (var item in cities)
            {
                Cities.Add(item);
            }
            Query = String.Empty; // ""
        }
        // ----------------------------------------------------------------
        // ----------------------------------------------------------------
        public async void MakeQuery()
        {
            List <City> cities = await WeatherHelper.GetCities(Query);

            Cities.Clear();

            for (int x = 0; x < cities.Count; ++x)
            {
                Cities.Add(cities[x]);
            }

            MultipleCitiesAvailable = Cities.Count > 0;
        }