diff --git a/Client/Client/Client.csproj b/Client/Client/Client.csproj
index c5b8496..5d167d0 100644
--- a/Client/Client/Client.csproj
+++ b/Client/Client/Client.csproj
@@ -34,10 +34,16 @@
4
+
+ ..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
+
@@ -74,10 +80,11 @@
MSBuild:Compile
Designer
-
-
-
-
+
+
+
+
+
MSBuild:Compile
Designer
@@ -91,7 +98,7 @@
True
Reference.svcmap
-
+
MainWindow.xaml
@@ -99,7 +106,7 @@
-
+
Code
@@ -126,6 +133,9 @@
Reference.svcmap
+
+ Reference.svcmap
+
Reference.svcmap
@@ -133,9 +143,6 @@
Reference.svcmap
-
- Designer
-
Designer
@@ -175,8 +182,6 @@
Reference.cs
-
-
-
+
\ No newline at end of file
diff --git a/Client/Client/Connected Services/EHEC_Service/Client.EHEC_Service.Origin_Exam.datasource b/Client/Client/Connected Services/EHEC_Service/Client.EHEC_Service.Origin_Exam.datasource
new file mode 100644
index 0000000..69e8b6d
--- /dev/null
+++ b/Client/Client/Connected Services/EHEC_Service/Client.EHEC_Service.Origin_Exam.datasource
@@ -0,0 +1,10 @@
+
+
+
+ Client.EHEC_Service.Origin_Exam, Connected Services.EHEC_Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/Client/Client/Connected Services/EHEC_Service/Reference.cs b/Client/Client/Connected Services/EHEC_Service/Reference.cs
index 27bf7fb..77c4a65 100644
--- a/Client/Client/Connected Services/EHEC_Service/Reference.cs
+++ b/Client/Client/Connected Services/EHEC_Service/Reference.cs
@@ -15,14 +15,31 @@ namespace Client.EHEC_Service {
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="DoctorAccess", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server.DatabaseAccess")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="Doctor", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
[System.SerializableAttribute()]
- [System.Runtime.Serialization.KnownTypeAttribute(typeof(Client.EHEC_Service.Doctor))]
- public partial class DoctorAccess : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+ public partial class Doctor : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private int DoctorIdField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string DoctorOriginField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private Client.EHEC_Service.Exam[] ExamsField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string FirstNameField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string LastNameField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string RegionField;
+
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
@@ -33,40 +50,6 @@ namespace Client.EHEC_Service {
}
}
- public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
-
- protected void RaisePropertyChanged(string propertyName) {
- System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
- if ((propertyChanged != null)) {
- propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
- }
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="Doctor", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
- [System.SerializableAttribute()]
- public partial class Doctor : Client.EHEC_Service.DoctorAccess {
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private int DoctorIdField;
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private string DoctorOriginField;
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private Client.EHEC_Service.Exam[] ExamField;
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private string FirstNameField;
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private string LastNameField;
-
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private string RegionField;
-
[System.Runtime.Serialization.DataMemberAttribute()]
public int DoctorId {
get {
@@ -94,14 +77,14 @@ namespace Client.EHEC_Service {
}
[System.Runtime.Serialization.DataMemberAttribute()]
- public Client.EHEC_Service.Exam[] Exam {
+ public Client.EHEC_Service.Exam[] Exams {
get {
- return this.ExamField;
+ return this.ExamsField;
}
set {
- if ((object.ReferenceEquals(this.ExamField, value) != true)) {
- this.ExamField = value;
- this.RaisePropertyChanged("Exam");
+ if ((object.ReferenceEquals(this.ExamsField, value) != true)) {
+ this.ExamsField = value;
+ this.RaisePropertyChanged("Exams");
}
}
}
@@ -144,13 +127,25 @@ namespace Client.EHEC_Service {
}
}
}
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="Exam", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
[System.SerializableAttribute()]
- public partial class Exam : Client.EHEC_Service.ExamAccess {
+ public partial class Exam : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+ [System.NonSerializedAttribute()]
+ private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private Client.EHEC_Service.Doctor DoctorField;
@@ -161,9 +156,6 @@ namespace Client.EHEC_Service {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private int ExamIdField;
- [System.Runtime.Serialization.OptionalFieldAttribute()]
- private int OriginOriginIdField;
-
[System.Runtime.Serialization.OptionalFieldAttribute()]
private Client.EHEC_Service.Origin_Exam[] Origin_ExamField;
@@ -179,6 +171,16 @@ namespace Client.EHEC_Service {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private int Result_ResultIdField;
+ [global::System.ComponentModel.BrowsableAttribute(false)]
+ public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+ get {
+ return this.extensionDataField;
+ }
+ set {
+ this.extensionDataField = value;
+ }
+ }
+
[System.Runtime.Serialization.DataMemberAttribute()]
public Client.EHEC_Service.Doctor Doctor {
get {
@@ -218,19 +220,6 @@ namespace Client.EHEC_Service {
}
}
- [System.Runtime.Serialization.DataMemberAttribute()]
- public int OriginOriginId {
- get {
- return this.OriginOriginIdField;
- }
- set {
- if ((this.OriginOriginIdField.Equals(value) != true)) {
- this.OriginOriginIdField = value;
- this.RaisePropertyChanged("OriginOriginId");
- }
- }
- }
-
[System.Runtime.Serialization.DataMemberAttribute()]
public Client.EHEC_Service.Origin_Exam[] Origin_Exam {
get {
@@ -295,27 +284,6 @@ namespace Client.EHEC_Service {
}
}
}
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="ExamAccess", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server.DatabaseAccess")]
- [System.SerializableAttribute()]
- [System.Runtime.Serialization.KnownTypeAttribute(typeof(Client.EHEC_Service.Exam))]
- public partial class ExamAccess : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
-
- [System.NonSerializedAttribute()]
- private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-
- [global::System.ComponentModel.BrowsableAttribute(false)]
- public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
- get {
- return this.extensionDataField;
- }
- set {
- this.extensionDataField = value;
- }
- }
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
@@ -331,7 +299,10 @@ namespace Client.EHEC_Service {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="Patient", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
[System.SerializableAttribute()]
- public partial class Patient : Client.EHEC_Service.PatientAccess {
+ public partial class Patient : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+ [System.NonSerializedAttribute()]
+ private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.DateTime BirthDateField;
@@ -340,7 +311,7 @@ namespace Client.EHEC_Service {
private string CityField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
- private Client.EHEC_Service.Exam[] ExamField;
+ private Client.EHEC_Service.Exam[] ExamsField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string FirstNameField;
@@ -357,6 +328,16 @@ namespace Client.EHEC_Service {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string StreetField;
+ [global::System.ComponentModel.BrowsableAttribute(false)]
+ public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+ get {
+ return this.extensionDataField;
+ }
+ set {
+ this.extensionDataField = value;
+ }
+ }
+
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime BirthDate {
get {
@@ -384,14 +365,14 @@ namespace Client.EHEC_Service {
}
[System.Runtime.Serialization.DataMemberAttribute()]
- public Client.EHEC_Service.Exam[] Exam {
+ public Client.EHEC_Service.Exam[] Exams {
get {
- return this.ExamField;
+ return this.ExamsField;
}
set {
- if ((object.ReferenceEquals(this.ExamField, value) != true)) {
- this.ExamField = value;
- this.RaisePropertyChanged("Exam");
+ if ((object.ReferenceEquals(this.ExamsField, value) != true)) {
+ this.ExamsField = value;
+ this.RaisePropertyChanged("Exams");
}
}
}
@@ -460,16 +441,28 @@ namespace Client.EHEC_Service {
}
}
}
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="Result", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
[System.SerializableAttribute()]
- public partial class Result : Client.EHEC_Service.ResultAccess {
+ public partial class Result : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+ [System.NonSerializedAttribute()]
+ private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
- private Client.EHEC_Service.Exam[] ExamField;
+ private Client.EHEC_Service.Exam[] ExamsField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string NameField;
@@ -477,15 +470,25 @@ namespace Client.EHEC_Service {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private int ResultIdField;
- [System.Runtime.Serialization.DataMemberAttribute()]
- public Client.EHEC_Service.Exam[] Exam {
+ [global::System.ComponentModel.BrowsableAttribute(false)]
+ public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
- return this.ExamField;
+ return this.extensionDataField;
}
set {
- if ((object.ReferenceEquals(this.ExamField, value) != true)) {
- this.ExamField = value;
- this.RaisePropertyChanged("Exam");
+ this.extensionDataField = value;
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public Client.EHEC_Service.Exam[] Exams {
+ get {
+ return this.ExamsField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.ExamsField, value) != true)) {
+ this.ExamsField = value;
+ this.RaisePropertyChanged("Exams");
}
}
}
@@ -515,6 +518,15 @@ namespace Client.EHEC_Service {
}
}
}
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
@@ -630,7 +642,10 @@ namespace Client.EHEC_Service {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="Origin", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server")]
[System.SerializableAttribute()]
- public partial class Origin : Client.EHEC_Service.OriginAccess {
+ public partial class Origin : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+ [System.NonSerializedAttribute()]
+ private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string CityField;
@@ -650,6 +665,16 @@ namespace Client.EHEC_Service {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string StreetField;
+ [global::System.ComponentModel.BrowsableAttribute(false)]
+ public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+ get {
+ return this.extensionDataField;
+ }
+ set {
+ this.extensionDataField = value;
+ }
+ }
+
[System.Runtime.Serialization.DataMemberAttribute()]
public string City {
get {
@@ -727,87 +752,6 @@ namespace Client.EHEC_Service {
}
}
}
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="OriginAccess", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server.DatabaseAccess")]
- [System.SerializableAttribute()]
- [System.Runtime.Serialization.KnownTypeAttribute(typeof(Client.EHEC_Service.Origin))]
- public partial class OriginAccess : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
-
- [System.NonSerializedAttribute()]
- private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-
- [global::System.ComponentModel.BrowsableAttribute(false)]
- public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
- get {
- return this.extensionDataField;
- }
- set {
- this.extensionDataField = value;
- }
- }
-
- public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
-
- protected void RaisePropertyChanged(string propertyName) {
- System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
- if ((propertyChanged != null)) {
- propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
- }
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="PatientAccess", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server.DatabaseAccess")]
- [System.SerializableAttribute()]
- [System.Runtime.Serialization.KnownTypeAttribute(typeof(Client.EHEC_Service.Patient))]
- public partial class PatientAccess : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
-
- [System.NonSerializedAttribute()]
- private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-
- [global::System.ComponentModel.BrowsableAttribute(false)]
- public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
- get {
- return this.extensionDataField;
- }
- set {
- this.extensionDataField = value;
- }
- }
-
- public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
-
- protected void RaisePropertyChanged(string propertyName) {
- System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
- if ((propertyChanged != null)) {
- propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
- }
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
- [System.Runtime.Serialization.DataContractAttribute(Name="ResultAccess", Namespace="http://schemas.datacontract.org/2004/07/EHEC_Server.DatabaseAccess")]
- [System.SerializableAttribute()]
- [System.Runtime.Serialization.KnownTypeAttribute(typeof(Client.EHEC_Service.Result))]
- public partial class ResultAccess : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
-
- [System.NonSerializedAttribute()]
- private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-
- [global::System.ComponentModel.BrowsableAttribute(false)]
- public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
- get {
- return this.extensionDataField;
- }
- set {
- this.extensionDataField = value;
- }
- }
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
@@ -847,6 +791,12 @@ namespace Client.EHEC_Service {
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/WriteExam", ReplyAction="http://tempuri.org/IService/WriteExamResponse")]
System.Threading.Tasks.Task WriteExamAsync(Client.EHEC_Service.Exam exam);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/WriteOrigin_Exam", ReplyAction="http://tempuri.org/IService/WriteOrigin_ExamResponse")]
+ Client.EHEC_Service.Origin_Exam WriteOrigin_Exam(Client.EHEC_Service.Origin_Exam origin_exam);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/WriteOrigin_Exam", ReplyAction="http://tempuri.org/IService/WriteOrigin_ExamResponse")]
+ System.Threading.Tasks.Task WriteOrigin_ExamAsync(Client.EHEC_Service.Origin_Exam origin_exam);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/WriteResult", ReplyAction="http://tempuri.org/IService/WriteResultResponse")]
Client.EHEC_Service.Result WriteResult(Client.EHEC_Service.Result result);
@@ -919,6 +869,14 @@ namespace Client.EHEC_Service {
return base.Channel.WriteExamAsync(exam);
}
+ public Client.EHEC_Service.Origin_Exam WriteOrigin_Exam(Client.EHEC_Service.Origin_Exam origin_exam) {
+ return base.Channel.WriteOrigin_Exam(origin_exam);
+ }
+
+ public System.Threading.Tasks.Task WriteOrigin_ExamAsync(Client.EHEC_Service.Origin_Exam origin_exam) {
+ return base.Channel.WriteOrigin_ExamAsync(origin_exam);
+ }
+
public Client.EHEC_Service.Result WriteResult(Client.EHEC_Service.Result result) {
return base.Channel.WriteResult(result);
}
diff --git a/Client/Client/Connected Services/EHEC_Service/Reference.svcmap b/Client/Client/Connected Services/EHEC_Service/Reference.svcmap
index 20a85df..0fb911a 100644
--- a/Client/Client/Connected Services/EHEC_Service/Reference.svcmap
+++ b/Client/Client/Connected Services/EHEC_Service/Reference.svcmap
@@ -22,12 +22,11 @@
-
-
-
+
+
diff --git a/Client/Client/Connected Services/EHEC_Service/Service.wsdl b/Client/Client/Connected Services/EHEC_Service/Service.wsdl
index 4729ef6..9ad57bf 100644
--- a/Client/Client/Connected Services/EHEC_Service/Service.wsdl
+++ b/Client/Client/Connected Services/EHEC_Service/Service.wsdl
@@ -5,7 +5,6 @@
-
@@ -32,6 +31,12 @@
+
+
+
+
+
+
@@ -61,6 +66,10 @@
+
+
+
+
@@ -108,6 +117,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/Client/Client/Connected Services/EHEC_Service/Service.xsd b/Client/Client/Connected Services/EHEC_Service/Service.xsd
deleted file mode 100644
index a249447..0000000
--- a/Client/Client/Connected Services/EHEC_Service/Service.xsd
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Client/Client/Connected Services/EHEC_Service/Service1.xsd b/Client/Client/Connected Services/EHEC_Service/Service1.xsd
index 4622ce8..50d4f43 100644
--- a/Client/Client/Connected Services/EHEC_Service/Service1.xsd
+++ b/Client/Client/Connected Services/EHEC_Service/Service1.xsd
@@ -57,17 +57,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -79,7 +93,7 @@
-
+
diff --git a/Client/Client/Connected Services/EHEC_Service/Service3.xsd b/Client/Client/Connected Services/EHEC_Service/Service3.xsd
index 2d27ea7..7b6194a 100644
--- a/Client/Client/Connected Services/EHEC_Service/Service3.xsd
+++ b/Client/Client/Connected Services/EHEC_Service/Service3.xsd
@@ -1,19 +1,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -23,21 +18,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -57,47 +47,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Client/Client/MainWindow.xaml b/Client/Client/MainWindow.xaml
index a0be05d..ed04a42 100644
--- a/Client/Client/MainWindow.xaml
+++ b/Client/Client/MainWindow.xaml
@@ -30,100 +30,100 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -137,132 +137,160 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/Client/Client/MainWindow.xaml.cs b/Client/Client/MainWindow.xaml.cs
index a1a79ec..67c544e 100644
--- a/Client/Client/MainWindow.xaml.cs
+++ b/Client/Client/MainWindow.xaml.cs
@@ -14,6 +14,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using Xceed.Wpf.Toolkit;
using Client.EHEC_Service;
+using AutoMapper;
namespace Client
{
@@ -25,10 +26,11 @@ namespace Client
public MainWindow()
{
InitializeComponent();
+ // Start Automapper
+ Mapper.Initialize(cfg => cfg.AddProfile());
// loading of dropdowns
-
- }
+ }
private void ButtonClose_Click(object sender, RoutedEventArgs e)
{
@@ -36,14 +38,16 @@ namespace Client
}
private void ButtonSend_Click(object sender, RoutedEventArgs e)
{
+ LabelRueckmeldungsfeld.Content = "sende Daten...";
Doctor newDoctor = new Doctor(TextboxArztVorname.Text,
- TextboxArztname.Text,
+ TextboxArztName.Text,
TextboxArztStrasseNr.Text,
TextboxArztPlz.Text,
TextboxArztOrt.Text,
TextboxArztRegion.Text,
TextboxArztKantonsarzt.Text
);
+
Patient newPatient = new Patient(TextboxPatientVorname.Text,
TextboxPatientName.Text,
TextboxPatientStrasseNr.Text,
@@ -52,20 +56,124 @@ namespace Client
TextboxPatientRegion.Text,
TextboxPatientGeburtstag.Text
);
+
Result newResult = new Result(TextboxBakterienstamm.Text);
- //Origin newOrigin = new Origin();
- Exam newExam = new Exam(newDoctor.CreateDoctor(),
- newPatient.CreatePatient(),
- newResult.CreateResult()
+ LabelRueckmeldungsfeld.Content = "erstelle Doktor.";
+ newDoctor.CreateDoctor();
+ LabelRueckmeldungsfeld.Content = "erstelle Patient.";
+ newPatient.CreatePatient();
+ LabelRueckmeldungsfeld.Content = "erstelle Bakterie.";
+ newResult.CreateResult();
+
+ Exam newExam = new Exam(newDoctor.Id,
+ newPatient.Id,
+ newResult.Id
);
+ LabelRueckmeldungsfeld.Content = "erstelle Untersuchung.";
+ newExam.CreateExam();
+
+ Origin newOrigin1 = new Origin(TextboxNahrung1Restaurant.Text,
+ TextboxNahrung1Essen.Text,
+ TextboxNahrung1Strasse.Text,
+ Convert.ToInt32(TextboxNahrung1Plz.Text),
+ TextboxNahrung1Ort.Text
+ );
+
+ Origin newOrigin2 = new Origin(TextboxNahrung2Restaurant.Text,
+ TextboxNahrung2Essen.Text,
+ TextboxNahrung2Strasse.Text,
+ Convert.ToInt32(TextboxNahrung2Plz.Text),
+ TextboxNahrung2Ort.Text
+ );
+
+ Origin newOrigin3 = new Origin(TextboxNahrung3Restaurant.Text,
+ TextboxNahrung3Essen.Text,
+ TextboxNahrung3Strasse.Text,
+ Convert.ToInt32(TextboxNahrung3Plz.Text),
+ TextboxNahrung3Ort.Text
+ );
+
+ Origin newOrigin4 = new Origin(TextboxNahrung4Restaurant.Text,
+ TextboxNahrung4Essen.Text,
+ TextboxNahrung4Strasse.Text,
+ Convert.ToInt32(TextboxNahrung4Plz.Text),
+ TextboxNahrung4Ort.Text
+ );
+ LabelRueckmeldungsfeld.Content = "erstelle Nahrungsaufnahmen.";
+ newOrigin1.CreateOrigin();
+ newOrigin2.CreateOrigin();
+ newOrigin3.CreateOrigin();
+ newOrigin4.CreateOrigin();
+
+ Origin_Exam newOrigin_Exam1 = new Origin_Exam(newOrigin1.Id,
+ newExam.Id
+ );
+
+ Origin_Exam newOrigin_Exam2 = new Origin_Exam(newOrigin2.Id,
+ newExam.Id
+ );
+
+ Origin_Exam newOrigin_Exam3 = new Origin_Exam(newOrigin3.Id,
+ newExam.Id
+ );
+
+ Origin_Exam newOrigin_Exam4 = new Origin_Exam(newOrigin4.Id,
+ newExam.Id
+ );
+
+ LabelRueckmeldungsfeld.Content = "verlinke Nahrungsaufnahmen mit der Untersuchungsnummer.";
+ newOrigin_Exam1.CreateOrigin_Exam();
+ newOrigin_Exam2.CreateOrigin_Exam();
+ newOrigin_Exam3.CreateOrigin_Exam();
+ newOrigin_Exam4.CreateOrigin_Exam();
+ LabelRueckmeldungsfeld.Content = "Fertig.";
}
private void ButtonAutogenerateMany_Click(object sender, RoutedEventArgs e)
{
}
+
+ private void ButtonAutogenerateOne_Click(object sender, RoutedEventArgs e)
+ {
+ TextboxArztName.Text = "doctorLastname";
+ TextboxArztVorname.Text = "doctorFirstname";
+ TextboxArztStrasseNr.Text = "doctorStreet";
+ TextboxArztPlz.Text = "1000";
+ TextboxArztOrt.Text = "doctorCity";
+ TextboxArztKantonsarzt.Text = "doctorOrigin";
+ TextboxArztRegion.Text = "ArztRegion";
+ TextboxPatientName.Text = "patientLastname";
+ TextboxPatientVorname.Text = "patientFirstname";
+ TextboxPatientStrasseNr.Text = "patientStreet";
+ TextboxPatientPlz.Text = "2000";
+ TextboxPatientOrt.Text = "patientCity";
+ TextboxPatientRegion.Text = "patientRegion";
+ TextboxPatientGeburtstag.Text = "1.1.2001";
+ TextboxBakterienstamm.Text = "bacteriaName";
+ TextboxNahrung1Restaurant.Text = "firstRestaurantName";
+ TextboxNahrung1Essen.Text = "firstRestaurantFood";
+ TextboxNahrung1Strasse.Text = "firstRestaurantStreet";
+ TextboxNahrung1Plz.Text = "1111";
+ TextboxNahrung1Ort.Text = "firstRestaurantCity";
+ TextboxNahrung2Restaurant.Text = "secondRestaurantName";
+ TextboxNahrung2Essen.Text = "secondRestaurantFood";
+ TextboxNahrung2Strasse.Text = "secondRestaurantStreet";
+ TextboxNahrung2Plz.Text = "2222";
+ TextboxNahrung2Ort.Text = "secondRestaurantCity";
+ TextboxNahrung3Restaurant.Text = "thirdRestaurantName";
+ TextboxNahrung3Essen.Text = "thirdRestaurantFood";
+ TextboxNahrung3Strasse.Text = "thirdRestaurantStreet";
+ TextboxNahrung3Plz.Text = "3333";
+ TextboxNahrung3Ort.Text = "thirdRestaurantCity";
+ TextboxNahrung4Restaurant.Text = "fourthRestaurantName";
+ TextboxNahrung4Essen.Text = "fourthRestaurantFood";
+ TextboxNahrung4Strasse.Text = "fourthRestaurantStreet";
+ TextboxNahrung4Plz.Text = "4444";
+ TextboxNahrung4Ort.Text = "fourthRestaurantCity";
+ }
}
diff --git a/Client/Client/Models/AutomapperProfile.cs b/Client/Client/Models/AutomapperProfile.cs
new file mode 100644
index 0000000..6e838b6
--- /dev/null
+++ b/Client/Client/Models/AutomapperProfile.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using AutoMapper;
+
+namespace Client
+{
+ class AutomapperProfile: Profile
+ {
+ public AutomapperProfile()
+ {
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ }
+ }
+}
diff --git a/Client/Client/ServiceClasses/Doctor.cs b/Client/Client/Models/Doctor.cs
similarity index 85%
rename from Client/Client/ServiceClasses/Doctor.cs
rename to Client/Client/Models/Doctor.cs
index 5a38b8e..e433689 100644
--- a/Client/Client/ServiceClasses/Doctor.cs
+++ b/Client/Client/Models/Doctor.cs
@@ -3,19 +3,21 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using AutoMapper;
namespace Client
{
public class Doctor
{
+ public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Strasse { get; set; }
public int Plz { get; set; }
public string Ort { get; set; }
public string Region { get; set; }
- public string DocType { get; set; }
-
+ public string DoctorOrigin { get; set; }
+ public Doctor() {}
///
/// this is my doctor construcor
///
@@ -38,13 +40,13 @@ namespace Client
Plz = Convert.ToInt32(plz);
Ort = ort;
Region = region;
- DocType = doctype;
+ DoctorOrigin = doctype;
}
///
/// This writes the doctor back to the service into the db
///
- public int CreateDoctor()
+ public Doctor CreateDoctor()
{
// write doctor to wcf interface
EHEC_Service.Doctor mydoctor = new EHEC_Service.Doctor
@@ -52,10 +54,10 @@ namespace Client
FirstName = FirstName,
LastName = LastName,
Region = Region,
- DoctorOrigin = DocType
+ DoctorOrigin = DoctorOrigin
};
Global.GlobalInstance.Service.WriteDoctor(mydoctor);
- return mydoctor.DoctorId;
+ return Mapper.Map(mydoctor);
}
}
diff --git a/Client/Client/ServiceClasses/Exam.cs b/Client/Client/Models/Exam.cs
similarity index 66%
rename from Client/Client/ServiceClasses/Exam.cs
rename to Client/Client/Models/Exam.cs
index 6741002..d47d3a0 100644
--- a/Client/Client/ServiceClasses/Exam.cs
+++ b/Client/Client/Models/Exam.cs
@@ -3,33 +3,35 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using AutoMapper;
namespace Client
{
public class Exam
{
- public int DocID { get; set; }
+ public int Id { get; set; }
+ public int DoctorID { get; set; }
public int PatientID { get; set; }
public int ResultID { get; set; }
- public Exam(int docId,
+ public Exam() { }
+ public Exam(int doctorId,
int patientId,
int resultId
- )
- {
- DocID = docId;
+ ){
+ DoctorID = doctorId;
PatientID = patientId;
ResultID = resultId;
}
- public int CreateExam()
+ public Exam CreateExam()
{
EHEC_Service.Exam myExam = new EHEC_Service.Exam
{
- DoctorId = DocID,
+ DoctorId = DoctorID,
PatientId = PatientID,
Result_ResultId = ResultID
};
Global.GlobalInstance.Service.WriteExam(myExam);
- return myExam.ExamId;
+ return Mapper.Map(myExam);
}
}
}
diff --git a/Client/Client/ServiceClasses/Origin.cs b/Client/Client/Models/Origin.cs
similarity index 68%
rename from Client/Client/ServiceClasses/Origin.cs
rename to Client/Client/Models/Origin.cs
index 98c69a5..780efe0 100644
--- a/Client/Client/ServiceClasses/Origin.cs
+++ b/Client/Client/Models/Origin.cs
@@ -3,16 +3,23 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using AutoMapper;
namespace Client
{
public class Origin
{
- public string RestaurantName { get; set; }
- public string Foodtype { get; set; }
+ public int Id { get; set; }
+ public string Name { get; set; }
+ public string Food { get; set; }
public string Street { get; set; }
public int Plz { get; set; }
public string City { get; set; }
+
+ public Origin()
+ {
+
+ }
public Origin(string restName,
string foodtype,
string street,
@@ -20,24 +27,24 @@ namespace Client
string city
)
{
- RestaurantName = restName;
- Foodtype = foodtype;
+ Name = restName;
+ Food = foodtype;
Street = street;
Plz = plz;
City = city;
}
- public int CreateOrigin()
+ public Origin CreateOrigin()
{
EHEC_Service.Origin myorigin = new EHEC_Service.Origin
{
- Name = RestaurantName,
- Food = Foodtype,
+ Name = Name,
+ Food = Food,
Street = Street,
City = City,
};
Global.GlobalInstance.Service.WriteOrigin(myorigin);
- return myorigin.OriginId;
+ return Mapper.Map(myorigin);
}
}
}
diff --git a/Client/Client/ServiceClasses/Origin_Exam.cs b/Client/Client/Models/Origin_Exam.cs
similarity index 60%
rename from Client/Client/ServiceClasses/Origin_Exam.cs
rename to Client/Client/Models/Origin_Exam.cs
index a618241..24e4c2d 100644
--- a/Client/Client/ServiceClasses/Origin_Exam.cs
+++ b/Client/Client/Models/Origin_Exam.cs
@@ -3,13 +3,20 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using AutoMapper;
-namespace Client.ServiceClasses
+namespace Client
{
public class Origin_Exam
{
- public int OriginOriginId;
- public int ExamExamId;
+ public int Id { get; set; }
+ public int OriginOriginId { get; set; }
+ public int ExamExamId { get; set; }
+
+ public Origin_Exam()
+ {
+
+ }
public Origin_Exam(int originOriginId,
int examExamId
)
@@ -17,15 +24,15 @@ namespace Client.ServiceClasses
OriginOriginId = originOriginId;
ExamExamId = examExamId;
}
- public int CreateOrigin_Exam()
+ public Origin_Exam CreateOrigin_Exam()
{
EHEC_Service.Origin_Exam myorigin_Exam = new EHEC_Service.Origin_Exam
{
OriginOriginId = OriginOriginId,
ExamExamId = ExamExamId
};
- //Global.GlobalInstance.Service.W
- return myorigin_Exam.Origin_ExamId;
+ Global.GlobalInstance.Service.WriteOrigin_Exam(myorigin_Exam);
+ return Mapper.Map(myorigin_Exam);
}
}
}
diff --git a/Client/Client/ServiceClasses/Patient.cs b/Client/Client/Models/Patient.cs
similarity index 64%
rename from Client/Client/ServiceClasses/Patient.cs
rename to Client/Client/Models/Patient.cs
index a24f9cb..2f1598e 100644
--- a/Client/Client/ServiceClasses/Patient.cs
+++ b/Client/Client/Models/Patient.cs
@@ -3,11 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-
+using AutoMapper;
namespace Client
{
public class Patient
{
+ public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Street { get; set; }
@@ -33,8 +34,8 @@ namespace Client
Region = region;
BirthDate = birthDate;
}
-
- public int CreatePatient()
+ public Patient() { }
+ public Patient CreatePatient()
{
EHEC_Service.Patient mypatient = new EHEC_Service.Patient
{
@@ -46,7 +47,23 @@ namespace Client
BirthDate = Convert.ToDateTime(BirthDate)
};
Global.GlobalInstance.Service.WritePatient(mypatient);
- return mypatient.PatientId;
+
+ // Mapper back to Object of Local 'Patient' object but with
+ // the new 'EHEC_Service.Patient' in the db created id:
+ //Patient p = new Patient()
+ //{
+ // id = mypatient.PatientId,
+ // FirstName = mypatient.FirstName,
+ // LastName = mypatient.LastName,
+ // Street = mypatient.Street,
+ // City = mypatient.City,
+ // Region = mypatient.Region,
+ // BirthDate = Convert.ToString(mypatient.BirthDate)
+ //};
+ //return p;
+
+ // Automapper version:
+ return Mapper.Map(mypatient);
}
}
}
diff --git a/Client/Client/ServiceClasses/Result.cs b/Client/Client/Models/Result.cs
similarity index 59%
rename from Client/Client/ServiceClasses/Result.cs
rename to Client/Client/Models/Result.cs
index 225ff24..5cac5dd 100644
--- a/Client/Client/ServiceClasses/Result.cs
+++ b/Client/Client/Models/Result.cs
@@ -3,25 +3,32 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using AutoMapper;
namespace Client
{
public class Result
{
- public string ResultName { get; set; }
+ public int Id { get; set; }
+ public string Name { get; set; }
+
+ public Result()
+ {
+
+ }
public Result(string resultName)
{
- ResultName = resultName;
+ Name = resultName;
}
- public int CreateResult()
+ public Result CreateResult()
{
EHEC_Service.Result myResult = new EHEC_Service.Result
{
- Name = ResultName
+ Name = Name
};
Global.GlobalInstance.Service.WriteResult(myResult);
- return myResult.ResultId;
+ return Mapper.Map(myResult);
}
}
}
diff --git a/Client/Client/packages.config b/Client/Client/packages.config
index accb82a..b84b478 100644
--- a/Client/Client/packages.config
+++ b/Client/Client/packages.config
@@ -1,4 +1,6 @@
+
+
\ No newline at end of file