Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //copy scrape
            resortService = new ResortService(resortRepository);

            IList <Resort> resorts = resortService.GetAll();

            ScrapeResort scrape = new ScrapeResort();

            foreach (Resort resort in resorts)
            {
                scrape = LocationDataManager.GetScrapeResort(resort.Name, resort.CountryName);
                if (!string.IsNullOrEmpty(scrape.Name))
                {
                    UpdateResort(resort, scrape, resortService);
                }
                else
                {
                    //try without accents
                    scrape = LocationDataManager.GetScrapeResort(RemoveAccents(resort.Name), resort.CountryName);
                    if (!string.IsNullOrEmpty(scrape.Name))
                    {
                        UpdateResort(resort, scrape, resortService);
                    }
                }
            }

            label10.Text = "Finished";
        }
Example #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            resortService = new ResortService(resortRepository);

            IList <Resort> resorts = resortService.GetAll();

            foreach (Resort resort in resorts)
            {
                resort.NameFriendlyFormat      = RemoveAccents(resort.Name);
                resort.PrettyUrlFriendlyFormat = RemoveAccents(resort.PrettyUrl);

                resortService.Update(resort);
            }

            label11.Text = "Finished";
        }
Example #3
0
        private void button4_Click(object sender, EventArgs e)
        {
            resortService = new ResortService(resortRepository);

            IList<Resort> resorts = resortService.GetAll();

            foreach (Resort resort in resorts)
            {
                resort.NameFriendlyFormat = RemoveAccents(resort.Name);
                resort.PrettyUrlFriendlyFormat = RemoveAccents(resort.PrettyUrl);

                resortService.Update(resort);
            }

            label11.Text = "Finished";
        }
Example #4
0
        private void button3_Click(object sender, EventArgs e)
        {
            //copy scrape
            resortService = new ResortService(resortRepository);

            IList<Resort> resorts = resortService.GetAll();

            ScrapeResort scrape = new ScrapeResort();
            foreach (Resort resort in resorts)
            {
                scrape = LocationDataManager.GetScrapeResort(resort.Name, resort.CountryName);
                if (!string.IsNullOrEmpty(scrape.Name))
                {
                    UpdateResort(resort, scrape, resortService);
                }
                else
                {
                    //try without accents
                    scrape = LocationDataManager.GetScrapeResort(RemoveAccents(resort.Name), resort.CountryName);
                    if (!string.IsNullOrEmpty(scrape.Name))
                    {
                        UpdateResort(resort, scrape, resortService);
                    }
                }

            }

            label10.Text = "Finished";
        }