Esempio n. 1
0
 /// <summary>
 /// this function will set the selected Country on Element Click
 /// </summary>
 /// <param name="selectedCountry">received the options country value</param>
 private void SelectElement(String selectedCountry)
 {
     if (selectedCountry.Trim().Length >= 2)
     {
         PageController.SelectedCountry = PageController.countries.Where(country => country.CountryCodeISO2 == selectedCountry.Substring(0, 2)).FirstOrDefault();
     }
     else
     {
         PageController.SelectedCountry = PageController.countries.Where(country => country.ID == 0).FirstOrDefault();
     }
     //after setting the selected country we also change the display value on the county
     DisplayController.ChangeCountry(PageController.SelectedCountry.IsCountryRomania);
 }