60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.Serialization;
|
|
using System.ServiceModel;
|
|
using System.Text;
|
|
using EHEC_Server.DataBuilder;
|
|
using EHEC_Server.DatabaseAccess;
|
|
|
|
namespace EHEC_Server
|
|
{
|
|
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service" in code, svc and config file together.
|
|
// NOTE: In order to launch WCF Test Client for testing this service, please select Service.svc or Service.svc.cs at the Solution Explorer and start debugging.
|
|
public class Service : IService
|
|
{
|
|
|
|
public List<Doctor> GetDoctors()
|
|
{
|
|
Doctor dataaccess = new Doctor();
|
|
return dataaccess.GetAllDoctors();
|
|
}
|
|
|
|
public List<Patient> GetPatients()
|
|
{
|
|
Patient dataaccess = new Patient();
|
|
return dataaccess.GetAllPatients();
|
|
}
|
|
|
|
public void WriteDoctor(Doctor doctor)
|
|
{
|
|
Doctor dataaccess = new Doctor();
|
|
dataaccess.CreateDoctor(doctor);
|
|
}
|
|
|
|
public void WritePatient(Patient patient)
|
|
{
|
|
Patient dataaccess = new Patient();
|
|
dataaccess.CreatePatient(patient);
|
|
}
|
|
|
|
public void WriteOrigin(Origin origin)
|
|
{
|
|
Origin dataaccess = new Origin();
|
|
dataaccess.CreateOrigin(origin);
|
|
}
|
|
|
|
public void WriteExam(Exam exam)
|
|
{
|
|
Exam dataaccess = new Exam();
|
|
dataaccess.CreateExam(exam);
|
|
}
|
|
|
|
public void WriteResult(Result result)
|
|
{
|
|
Result dataaccess = new Result();
|
|
dataaccess.CreateResult(result);
|
|
}
|
|
}
|
|
}
|