Пример #1
0
        public void LeadGenerateButton()
        {
            string selectedCity;
            string selectedProfession;
            string selectedWebsite;
            string selectedNumber;

            try
            {
                selectedCity = SelectedCities.City;
            }
            catch
            {
                MessageBox.Show("Proszę wybrać miasto", "info");
                return;
            }

            try
            {
                selectedProfession = SelectedProfession.Profession;
            }
            catch
            {
                MessageBox.Show("Proszę wybrać zawód", "info");
                return;
            }
            try
            {
                selectedWebsite = SelectedWeb.Web;
            }
            catch
            {
                MessageBox.Show("Proszę wybrać stronę", "info");
                return;
            }

            try
            {
                selectedNumber = SelectedNumber.Number;
            }
            catch
            {
                selectedNumber = string.Empty;
            }

            string link = linkHelper.CreateLink(selectedWebsite, selectedCity, selectedProfession, selectedNumber);

            ExtractedContent.Clear();
            ExtractedContent.AddRange(webContent.GetListOfWebsiteModels(link));

            if (!ExtractedContent.Any())
            {
                MessageBox.Show("No contacts for above criteria", "LOADING FAILED");
            }

            ActivateItem(new ContactViewModel(ExtractedContent));
        }