change forms
This commit is contained in:
parent
d4cf23c9ff
commit
3bee0d7b9a
|
@ -18,5 +18,16 @@
|
|||
<ColumnDefinition Width="455*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Add new exam" HorizontalAlignment="Left" VerticalAlignment="Top" Height="45" Width="433" FontFamily="Tahoma" FontSize="24" Margin="0.4,-3,0,0" Grid.Column="1" Grid.RowSpan="2"/>
|
||||
<Label Content="Date" Margin="0,115.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Description" Margin="0,163.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="44" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Patient" Margin="0,23.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontSize="24" FontFamily="Tahoma" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtDescription" HorizontalAlignment="Left" Height="34" Margin="137,163.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2"/>
|
||||
<ComboBox x:Name="ComboBoxPatients" HorizontalAlignment="Left" Margin="0.4,23.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Height="34" Grid.Column="1"/>
|
||||
<ComboBox x:Name="ComboBoxStrains" HorizontalAlignment="Left" Margin="0.4,212.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<Label Content="Strain" Margin="0,212.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="41" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Doctor" Margin="0,68.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontSize="24" FontFamily="Tahoma" Grid.ColumnSpan="2"/>
|
||||
<ComboBox x:Name="ComboBoxDoctors" HorizontalAlignment="Left" Margin="0.4,68.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Height="34" Grid.Column="1"/>
|
||||
<DatePicker x:Name="dateboxExamDate" HorizontalAlignment="Left" Margin="137,115.4,0,0" Grid.Row="1" VerticalAlignment="Top" Grid.ColumnSpan="2" Width="433" Height="34"/>
|
||||
<Button x:Name="btnAddExam" Content="ADD EXAM" HorizontalAlignment="Left" Margin="136,371.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Click="btnAddFoodPlace_Click" Grid.ColumnSpan="2" Height="44" FontSize="20"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -24,6 +24,48 @@ namespace WpfWebClient
|
|||
public ExamForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
|
||||
|
||||
|
||||
//Retrieve all doctors and save them into "doctorlist"
|
||||
List<WpfWebClient.ServiceReferenceEHEC.Doctor> doctorlist = new List<ServiceReferenceEHEC.Doctor>(client.GetDoctors());
|
||||
|
||||
//Display all doctors with name in Combobox
|
||||
ComboBoxDoctors.ItemsSource = doctorlist;
|
||||
ComboBoxDoctors.DisplayMemberPath = "FirstName";
|
||||
|
||||
//Retrieve all patients and save them into "patientlist"
|
||||
//List<WpfWebClient.ServiceReferenceEHEC.Person> patientlist = new List<ServiceReferenceEHEC.Person>(client.GetPatients());
|
||||
|
||||
//Display all patients with name in Combobox
|
||||
//ComboBoxDoctors.ItemsSource = patientlist;
|
||||
//ComboBoxDoctors.DisplayMemberPath = "FirstName";
|
||||
|
||||
//Retrieve all strains and save them into "strainlist"
|
||||
List<WpfWebClient.ServiceReferenceEHEC.Strain> strainlist = new List<ServiceReferenceEHEC.Strain>(client.GetStrains());
|
||||
|
||||
//Display all strains with name in Combobox
|
||||
ComboBoxDoctors.ItemsSource = strainlist;
|
||||
ComboBoxDoctors.DisplayMemberPath = "Name";
|
||||
|
||||
client.Close();
|
||||
}
|
||||
|
||||
private void btnAddFoodPlace_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
|
||||
|
||||
Exam exam = new Exam();
|
||||
|
||||
exam.Date = dateboxExamDate.SelectedDate.Value;
|
||||
//exam.Doctor = ComboBoxDoctors.SelectedValue.SelectedItem;
|
||||
//exam.Patient = ComboBoxPatients.SelectedValue.SelectedItem;
|
||||
exam.Description = txtDescription.ToString();
|
||||
//exam.Strain = ComboBoxStrains.SelectedItem;
|
||||
|
||||
client.WriteExam(exam);
|
||||
|
||||
client.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,5 +18,14 @@
|
|||
<ColumnDefinition Width="455*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Add new foodplace" HorizontalAlignment="Left" VerticalAlignment="Top" Height="45" Width="433" FontFamily="Tahoma" FontSize="24" Margin="0.4,-3,0,0" Grid.Column="1" Grid.RowSpan="2"/>
|
||||
<Label Content="Description" Margin="1,173.4,453.8,0" Grid.Row="1" VerticalAlignment="Top" Height="41" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Name" Margin="0,30.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Street" Margin="0,79.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtFoodPlaceDescription" HorizontalAlignment="Left" Height="34" Margin="137,172.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtFoodPlaceName" HorizontalAlignment="Left" Height="34" Margin="136,30.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtFoodPlaceStreetName" Height="34" Margin="136,79.4,23.8,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||
<Label Content="House Nr." Margin="0,125.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtFoodPlaceHouseNumber" Height="34" Margin="137,125.4,23.8,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||
<Button x:Name="btnAddFoodPlace" Content="ADD FOODPLACE" HorizontalAlignment="Left" Margin="136,371.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Click="btnAddFoodPlace_Click" Grid.ColumnSpan="2" Height="44" FontSize="20"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -25,5 +25,21 @@ namespace WpfWebClient
|
|||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnAddFoodPlace_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
|
||||
|
||||
FoodPlace fp = new FoodPlace();
|
||||
|
||||
fp.Name = txtFoodPlaceName.ToString();
|
||||
fp.Streetname = txtFoodPlaceStreetName.ToString();
|
||||
fp.Streetnumber = txtFoodPlaceHouseNumber.ToString();
|
||||
fp.Description = txtFoodPlaceDescription.ToString();
|
||||
|
||||
client.WriteFoodPlace(fp);
|
||||
|
||||
client.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,19 +18,22 @@
|
|||
<ColumnDefinition Width="455*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Add new patient" HorizontalAlignment="Left" VerticalAlignment="Top" Height="45" Width="433" FontFamily="Tahoma" FontSize="24" Margin="0.4,-3,0,0" Grid.Column="1" Grid.RowSpan="2"/>
|
||||
<Label Content="Surname" Margin="0,66.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Name" Margin="0,114.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Street" Margin="0,163.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="City" Margin="0,210.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="39" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Doctors" Margin="0,305.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" RenderTransformOrigin="0.533,1.244" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Surname" Margin="0,115.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Name" Margin="0,163.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Street" Margin="0,212.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="City" Margin="0,301.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="39" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Salutation" Margin="0,23.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontSize="24" FontFamily="Tahoma" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtSurname" Grid.Column="1" HorizontalAlignment="Left" Height="34" Margin="0.4,66.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433"/>
|
||||
<TextBox x:Name="txtFirstName" Grid.Column="1" HorizontalAlignment="Left" Height="34" Margin="0.4,114.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433"/>
|
||||
<TextBox x:Name="txtStreet" Grid.Column="1" Height="34" Margin="0.4,163.4,21.8,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="txtLastName" HorizontalAlignment="Left" Height="34" Margin="137,115.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtFirstName" HorizontalAlignment="Left" Height="34" Margin="137,163.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtStreetName" Height="34" Margin="137,212.4,22.8,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||
<ComboBox x:Name="ComboBoxSalutations" HorizontalAlignment="Left" Margin="0.4,23.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Height="34" Grid.Column="1"/>
|
||||
<ComboBox x:Name="ComboBoxCities" HorizontalAlignment="Left" Margin="0.4,215.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<ComboBox x:Name="ComboBoxCountries" HorizontalAlignment="Left" Margin="0.4,259.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<ComboBox x:Name="ComboBoxDoctors" HorizontalAlignment="Left" Margin="0.4,305.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<Label Content="Country" Margin="0,259.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="41" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<ComboBox x:Name="ComboBoxCities" HorizontalAlignment="Left" Margin="0.4,306.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<ComboBox x:Name="ComboBoxCountries" HorizontalAlignment="Left" Margin="0.4,350.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.Column="1" Height="34"/>
|
||||
<Label Content="Country" Margin="0,350.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="41" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<Label Content="Gender" Margin="0,68.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontSize="24" FontFamily="Tahoma" Grid.ColumnSpan="2"/>
|
||||
<ComboBox x:Name="ComboBoxGenders" HorizontalAlignment="Left" Margin="0.4,68.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Height="34" Grid.Column="1"/>
|
||||
<Button x:Name="btnAddPatient" Content="ADD PATIENT" HorizontalAlignment="Left" Margin="137,454.4,0,0" Grid.Row="1" VerticalAlignment="Top" Width="433" Grid.ColumnSpan="2" Height="34" FontSize="20" Click="btnAddPatient_Click"/>
|
||||
<Label Content="House Nr." Margin="0,258.4,454.8,0" Grid.Row="1" VerticalAlignment="Top" Height="34" FontFamily="Tahoma" FontSize="24" Grid.ColumnSpan="2"/>
|
||||
<TextBox x:Name="txtHouseNumber" Height="34" Margin="137,258.4,22.8,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -34,6 +34,13 @@ namespace WpfWebClient
|
|||
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());
|
||||
|
||||
|
@ -48,18 +55,30 @@ namespace WpfWebClient
|
|||
ComboBoxCountries.ItemsSource = countrylist;
|
||||
ComboBoxCountries.DisplayMemberPath = "Name";
|
||||
|
||||
//Retrieve all doctors and save them into "doctorlist"
|
||||
List<WpfWebClient.ServiceReferenceEHEC.Doctor> doctorlist = new List<ServiceReferenceEHEC.Doctor>(client.GetDoctors());
|
||||
|
||||
|
||||
//Display all doctors with name in Combobox
|
||||
ComboBoxDoctors.ItemsSource = doctorlist;
|
||||
ComboBoxDoctors.DisplayMemberPath = "FirstName";
|
||||
|
||||
|
||||
client.Close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnAddPatient_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
|
||||
|
||||
Person p = new Person();
|
||||
//p.Salutation = ComboBoxSalutations.SelectedValue;
|
||||
//p.Gender = ComboBoxGenders.SelectedValue;
|
||||
p.LastName = txtLastName.ToString();
|
||||
p.FirstName = txtFirstName.ToString();
|
||||
p.StreetName = txtStreetName.ToString();
|
||||
p.StreetNumber = txtHouseNumber.ToString();
|
||||
//p.City = ComboBoxCities.SelectedItem.ToString();
|
||||
|
||||
client.WritePatient(p);
|
||||
|
||||
client.Close();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue