diff --git a/WPFClient/WPFClient/CustomerDetails.xaml b/WPFClient/WPFClient/CustomerDetails.xaml
index 01a37a4..bdbdbba 100644
--- a/WPFClient/WPFClient/CustomerDetails.xaml
+++ b/WPFClient/WPFClient/CustomerDetails.xaml
@@ -13,7 +13,7 @@
-
+
diff --git a/WPFClient/WPFClient/CustomerDetails.xaml.cs b/WPFClient/WPFClient/CustomerDetails.xaml.cs
index c93e38d..753f64d 100644
--- a/WPFClient/WPFClient/CustomerDetails.xaml.cs
+++ b/WPFClient/WPFClient/CustomerDetails.xaml.cs
@@ -20,15 +20,42 @@ namespace WPFClient
///
public partial class CustomerDetails : Window
{
- public Person person { get; set; }
+ public Person Person { get; set; }
+ public List Cities { get; set; }
+ public List Genders { get; set; }
+ public List Salutations { get; set; }
+
public CustomerDetails()
{
InitializeComponent();
+ PlattformServiceClient client = new PlattformServiceClient();
+
+ // get the data from the service
+ this.Genders = client.GetGenders();
+ this.Salutations = client.GetSalutations();
+ this.Cities = client.GetCities();
+
+ // populate the dropdowns
+ this.DropDownCity.ItemSource = this.Cities;
+ this.DropDownCity.DisplayMemberPath = "Name";
+ this.DropDownGender.ItemSource = this.Genders;
+ this.DropDownGender.DisplayMemberPath = "Name";
+ this.DropDownSalutation.ItemSource = this.Salutations;
+ this.DropDownSalutation.DisplayMemberPath = "Name";
+ client.Close();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
-
+ Person person = new Person();
+ person.Gender = (Gender)DropDownGender.SelectedValue;
+ person.Salutation = (Salutation)DropDownSalutation.SelectedValue;
+ person.City = (City)DropDownCity.SelectedValue;
+ person.FirstName = TextBoxFirstName.Text;
+ person.LastName = TextBoxLastName.Text;
+ person.Streetname = TextBoxStreetname.Text;
+ person.Streenumber = TextBoxStreetnumber.Text;
+ this.person = person;
}
}
}