53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Client
|
|
{
|
|
public class Patient
|
|
{
|
|
public string FirstName { get; set; }
|
|
public string LastName { get; set; }
|
|
public string Street { get; set; }
|
|
public int Plz { get; set; }
|
|
public string City { get; set; }
|
|
public string Region { get; set; }
|
|
public string BirthDate { get; set; }
|
|
|
|
public Patient(string firstName,
|
|
string lastName,
|
|
string street,
|
|
string plz,
|
|
string city,
|
|
string region,
|
|
string birthDate
|
|
)
|
|
{
|
|
FirstName = firstName;
|
|
LastName = lastName;
|
|
Street = street;
|
|
Plz = Convert.ToInt32(plz);
|
|
City = city;
|
|
Region = region;
|
|
BirthDate = birthDate;
|
|
}
|
|
|
|
public int CreatePatient()
|
|
{
|
|
EHEC_Service.Patient mypatient = new EHEC_Service.Patient
|
|
{
|
|
FirstName = FirstName,
|
|
LastName = LastName,
|
|
Street = Street,
|
|
City = City,
|
|
Region = Region,
|
|
BirthDate = Convert.ToDateTime(BirthDate)
|
|
};
|
|
Global.GlobalInstance.Service.WritePatient(mypatient);
|
|
return mypatient.PatientId;
|
|
}
|
|
}
|
|
}
|