diff --git a/Server/Server/Web.config b/Server/Server/Web.config index 5578ec6..36c6a73 100644 --- a/Server/Server/Web.config +++ b/Server/Server/Web.config @@ -10,7 +10,7 @@ - + @@ -25,6 +25,9 @@ + + + diff --git a/WebClient/WpfWebClient/FoodplaceForm.xaml.cs b/WebClient/WpfWebClient/FoodplaceForm.xaml.cs index 1c38509..0da5157 100644 --- a/WebClient/WpfWebClient/FoodplaceForm.xaml.cs +++ b/WebClient/WpfWebClient/FoodplaceForm.xaml.cs @@ -33,7 +33,8 @@ namespace WpfWebClient // Display all cities with name in Combobox ComboBoxFPCities.ItemsSource = citylist; ComboBoxFPCities.DisplayMemberPath = "Name"; - + + client.Close(); } private void btnAddFoodPlace_Click(object sender, RoutedEventArgs e) diff --git a/WebClient/WpfWebClient/Helper/GenerateTestData.cs b/WebClient/WpfWebClient/Helper/GenerateTestData.cs index 4c2025b..1e0885d 100644 --- a/WebClient/WpfWebClient/Helper/GenerateTestData.cs +++ b/WebClient/WpfWebClient/Helper/GenerateTestData.cs @@ -96,7 +96,7 @@ namespace WpfWebClient.Helper do { - PatientAtFoodPlace patf = new PatientAtFoodPlace(); + PatientAtFoodPlace patfgen = new PatientAtFoodPlace(); int randnumFP = random.Next(0, foodPlaces.Count()); FoodPlace foodpl = foodPlaces[randnumFP]; @@ -104,11 +104,11 @@ namespace WpfWebClient.Helper int randnumP = random.Next(0, patients.Count()); Person patient = patients[randnumP]; - patf.FoodPlace = foodpl; - patf.Patient = patient; - patf.VistingDate = new DateTime(2005, 12, 20); + patfgen.FoodPlace = foodpl; + patfgen.Patient = patient; + patfgen.VistingDate = new DateTime(2005, 12, 20); - PatientsAtFoodPlaces.Add(patf); + PatientsAtFoodPlaces.Add(patfgen); i++; diff --git a/WebClient/WpfWebClient/Home.xaml.cs b/WebClient/WpfWebClient/Home.xaml.cs index 8853f87..6eae813 100644 --- a/WebClient/WpfWebClient/Home.xaml.cs +++ b/WebClient/WpfWebClient/Home.xaml.cs @@ -98,8 +98,6 @@ namespace WpfWebClient } // create a bunch of people at foodplaces - - var patientsatfps = GenerateTestData.CreatePatientAtFoodPlaces(int.Parse(txtNumberofTestdata.Text)); foreach (var f in patientsatfps) diff --git a/WebClient/WpfWebClient/PatientForm.xaml.cs b/WebClient/WpfWebClient/PatientForm.xaml.cs index f34819f..19a5189 100644 --- a/WebClient/WpfWebClient/PatientForm.xaml.cs +++ b/WebClient/WpfWebClient/PatientForm.xaml.cs @@ -68,9 +68,9 @@ namespace WpfWebClient Person p = new Person(); - // if (ComboBoxSalutations.SelectedValue != null && ComboBoxSalutations.SelectedValue is Salutation) - // if (ComboBoxGenders.SelectedValue != null && ComboBoxGenders.SelectedValue is Gender) - // if (ComboBoxCities.SelectedValue != null && ComboBoxCities.SelectedValue is City) + if (ComboBoxSalutations.SelectedValue != null && ComboBoxSalutations.SelectedValue is Salutation) + if (ComboBoxGenders.SelectedValue != null && ComboBoxGenders.SelectedValue is Gender) + if (ComboBoxCities.SelectedValue != null && ComboBoxCities.SelectedValue is City) // Pick all selected fields and send object to client p.Salutation = (Salutation)ComboBoxSalutations.SelectedValue;