diff --git a/WebClient/WpfWebClient/ExamForm.xaml.cs b/WebClient/WpfWebClient/ExamForm.xaml.cs
index d62a367..0a833a0 100644
--- a/WebClient/WpfWebClient/ExamForm.xaml.cs
+++ b/WebClient/WpfWebClient/ExamForm.xaml.cs
@@ -60,7 +60,7 @@ namespace WpfWebClient
exam.Date = dateboxExamDate.SelectedDate.Value;
exam.Doctor = (Doctor)ComboBoxDoctors.SelectedValue;
exam.Patient = (Person)ComboBoxPatients.SelectedValue;
- exam.Description = txtDescription.ToString();
+ exam.Description = txtDescription.Text;
exam.Strain = (Strain)ComboBoxStrains.SelectedValue;
client.WriteExam(exam);
diff --git a/WebClient/WpfWebClient/FoodplaceForm.xaml b/WebClient/WpfWebClient/FoodplaceForm.xaml
index 8019a3d..bb93366 100644
--- a/WebClient/WpfWebClient/FoodplaceForm.xaml
+++ b/WebClient/WpfWebClient/FoodplaceForm.xaml
@@ -18,14 +18,16 @@
-
+
-
+
+
+
diff --git a/WebClient/WpfWebClient/FoodplaceForm.xaml.cs b/WebClient/WpfWebClient/FoodplaceForm.xaml.cs
index aa53e3f..ee3cb8d 100644
--- a/WebClient/WpfWebClient/FoodplaceForm.xaml.cs
+++ b/WebClient/WpfWebClient/FoodplaceForm.xaml.cs
@@ -24,13 +24,22 @@ namespace WpfWebClient
public FoodplaceForm()
{
InitializeComponent();
+
+ WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
+
+ //Retrieve all cities and save them into "citylist"
+ List citylist = new List(client.GetCities());
+
+ //Display all cities with name in Combobox
+ ComboBoxFPCities.ItemsSource = citylist;
+ ComboBoxFPCities.DisplayMemberPath = "Name";
}
private void btnAddFoodPlace_Click(object sender, RoutedEventArgs e)
{
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
- client.Open();
+ // create new foodplace from user input
FoodPlace fp = new FoodPlace();
@@ -38,6 +47,7 @@ namespace WpfWebClient
fp.Streetname = txtFoodPlaceStreetName.Text;
fp.Streetnumber = txtFoodPlaceHouseNumber.Text;
fp.Description = txtFoodPlaceDescription.Text;
+ fp.City = (City)ComboBoxFPCities.SelectedValue;
client.WriteFoodPlace(fp);