2018-05-27 22:19:09 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
using Xceed.Wpf.Toolkit;
|
2018-06-26 22:06:18 +02:00
|
|
|
|
using Client.EHEC_Service;
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
|
|
|
|
namespace Client
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for MainWindow.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class MainWindow : Window
|
|
|
|
|
{
|
|
|
|
|
public MainWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ButtonClose_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
private void ButtonSend_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
2018-06-26 22:06:18 +02:00
|
|
|
|
ServiceClient servize = new ServiceClient("BasicHttpBinding_IService");
|
|
|
|
|
|
|
|
|
|
String arztName = TextboxArztname.Text;
|
|
|
|
|
String arztVorname = TextboxArztVorname.Text;
|
|
|
|
|
String arztStrasseNr = TextboxArztStrasseNr.Text;
|
|
|
|
|
String arztPlz = TextboxArztPlz.Text;
|
|
|
|
|
String arztOrt = TextboxArztOrt.Text;
|
|
|
|
|
String arztKantonsarzt = TextboxArztKantonsarzt.Text;
|
|
|
|
|
String arztRegion = TextboxArztRegion.Text;
|
|
|
|
|
String patientName = TextboxPatientName.Text;
|
|
|
|
|
String patientVorname = TextboxPatientVorname.Text;
|
|
|
|
|
String patientStrasseNr = TextboxPatientStrasseNr.Text;
|
|
|
|
|
String patientPlz = TextboxPatientPlz.Text;
|
|
|
|
|
String patientOrt = TextboxPatientOrt.Text;
|
|
|
|
|
String patientRegion = TextboxPatientRegion.Text;
|
|
|
|
|
DateTime patientGeburtstag = Convert.ToDateTime(TextboxPatientGeburtstag.Text);
|
|
|
|
|
String Bakterienstamm = TextboxBakterienstamm.Text;
|
|
|
|
|
String Nahrung1Restaurant = TextboxNahrung1Restaurant.Text;
|
|
|
|
|
String Nahrung2Restaurant = TextboxNahrung2Restaurant.Text;
|
|
|
|
|
String Nahrung3Restaurant = TextboxNahrung3Restaurant.Text;
|
|
|
|
|
String Nahrung4Restaurant = TextboxNahrung4Restaurant.Text;
|
|
|
|
|
String Nahrung5Restaurant = TextboxNahrung5Restaurant.Text;
|
|
|
|
|
|
|
|
|
|
Patient p = new Patient
|
|
|
|
|
{
|
|
|
|
|
BirthDate = patientGeburtstag,
|
|
|
|
|
City = patientOrt,
|
|
|
|
|
FirstName = patientVorname,
|
|
|
|
|
LastName = patientName,
|
|
|
|
|
Street = patientStrasseNr,
|
|
|
|
|
Region = patientRegion
|
|
|
|
|
};
|
|
|
|
|
servize.WritePatient(p);
|
2018-06-30 11:52:50 +02:00
|
|
|
|
if (p.PatientId == 0)
|
|
|
|
|
{
|
|
|
|
|
//LabelRueckmeldungsfeld.Text = "some";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Doctor d = new Doctor
|
|
|
|
|
{
|
|
|
|
|
FirstName = arztVorname,
|
|
|
|
|
LastName = arztName,
|
|
|
|
|
Region = arztRegion,
|
|
|
|
|
DoctorOrigin = arztKantonsarzt,
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
servize.WriteDoctor(d);
|
|
|
|
|
//WatermarkTextBox TextboxArztname = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ButtonAutogenerateMany_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
2018-05-27 22:19:09 +02:00
|
|
|
|
}
|
2018-06-26 22:06:18 +02:00
|
|
|
|
}
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
2018-06-26 22:06:18 +02:00
|
|
|
|
//private void TextChanged(object sender, KeyboardFocusChangedEventArgs e)
|
|
|
|
|
//{
|
|
|
|
|
// if (((TextBox)sender).Text.Length == 0)
|
|
|
|
|
// ((TextBox)sender).Text = ((TextBox)sender).Text.ToString();
|
|
|
|
|
//}
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
2018-06-26 22:06:18 +02:00
|
|
|
|
//private void TextInputs(object sender, EventArgs e)
|
|
|
|
|
//{
|
|
|
|
|
// if ((((TextBox)sender).Text) == (((TextBox)sender).Text))
|
|
|
|
|
// ((TextBox)sender).Text = string.Empty;
|
|
|
|
|
// ((TextBox)sender).SelectionStart = 1;
|
|
|
|
|
//}
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
2018-06-26 22:06:18 +02:00
|
|
|
|
//private void TextboxArztName_LostFocus(object sender, KeyboardFocusChangedEventArgs e) => TextChanged(sender, e);
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
2018-06-26 22:06:18 +02:00
|
|
|
|
//private void TextboxArztName_MouseDown(object sender, MouseButtonEventArgs e)
|
|
|
|
|
//{
|
|
|
|
|
// TextInputs(sender, e);
|
|
|
|
|
// //TextboxArztName.Text = string.Empty;
|
|
|
|
|
//}
|
|
|
|
|
//private void TextboxArztName_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
|
|
|
|
//{
|
|
|
|
|
// TextInputs(sender, e);
|
|
|
|
|
//}
|
2018-05-27 22:19:09 +02:00
|
|
|
|
|
2018-06-26 22:06:18 +02:00
|
|
|
|
|
2018-05-27 22:19:09 +02:00
|
|
|
|
}
|