public PatientForm() { InitializeComponent(); WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient(); // Retrieve all salutations and save them into "salutationlist" List <WpfWebClient.ServiceReferenceEHEC.Salutation> salutationlist = new List <ServiceReferenceEHEC.Salutation>(client.GetSalutations()); // Display all salutations with name in Combobox ComboBoxSalutations.ItemsSource = salutationlist; ComboBoxSalutations.DisplayMemberPath = "Name"; // Retrieve all genders and save them into "genderlist" List <WpfWebClient.ServiceReferenceEHEC.Gender> genderlist = new List <ServiceReferenceEHEC.Gender>(client.GetGenders()); // Display all genders with name in Combobox ComboBoxGenders.ItemsSource = genderlist; ComboBoxGenders.DisplayMemberPath = "Name"; // Retrieve all cities and save them into "citylist" List <WpfWebClient.ServiceReferenceEHEC.City> citylist = new List <ServiceReferenceEHEC.City>(client.GetCities()); // Display all cities with name in Combobox ComboBoxCities.ItemsSource = citylist; ComboBoxCities.DisplayMemberPath = "Name"; // Retrieve all salutations and save them into "countrylist" List <WpfWebClient.ServiceReferenceEHEC.Country> countrylist = new List <ServiceReferenceEHEC.Country>(client.GetCountries()); // Display all countries with name in Combobox ComboBoxCountries.ItemsSource = countrylist; ComboBoxCountries.DisplayMemberPath = "Name"; client.Close(); }