finished the dal data access layer files
This commit is contained in:
parent
27b3dfdacf
commit
31131c9cc0
|
@ -0,0 +1,30 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Web;
|
||||||
|
using Web_Server_EHEC.Model;
|
||||||
|
|
||||||
|
namespace Web_Server_EHEC.DAL
|
||||||
|
{
|
||||||
|
public class DoctorDAL
|
||||||
|
{
|
||||||
|
[DataContract]
|
||||||
|
public class Doctor : Person
|
||||||
|
{
|
||||||
|
private int DoctorId;
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public int Doctorid { get => DoctorId; set => DoctorId = value; }
|
||||||
|
|
||||||
|
public Doctor() { }
|
||||||
|
public Doctor(string firstName, string lastName, DateTime birthdate, string street, string city)
|
||||||
|
{
|
||||||
|
this.Firstname = firstName;
|
||||||
|
this.Lastname = lastName;
|
||||||
|
this.Street = street;
|
||||||
|
this.City = city;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Web;
|
||||||
|
using Web_Server_EHEC.Model;
|
||||||
|
|
||||||
|
namespace Web_Server_EHEC.DAL
|
||||||
|
{
|
||||||
|
[DataContract]
|
||||||
|
public class ExamDAL
|
||||||
|
{
|
||||||
|
public class Exam
|
||||||
|
{
|
||||||
|
private int _ExamId;
|
||||||
|
private bool _SicknessStatus;
|
||||||
|
private string _SicknessDesignation;
|
||||||
|
private int _OriginOriginId;
|
||||||
|
|
||||||
|
private Result _Result;
|
||||||
|
private Doctor _Doctor;
|
||||||
|
private Patient _Patient;
|
||||||
|
private Origin _Origin;
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public int ExamId { get => _ExamId; set => _ExamId = value; }
|
||||||
|
[DataMember]
|
||||||
|
public bool SicknessStatus { get => _SicknessStatus; set => _SicknessStatus = value; }
|
||||||
|
[DataMember]
|
||||||
|
public string SicknessDesignation { get => _SicknessDesignation; set => _SicknessDesignation = value; }
|
||||||
|
[DataMember]
|
||||||
|
public virtual Result Result { get => _Result; set => _Result = value; }
|
||||||
|
[DataMember]
|
||||||
|
public virtual Doctor Doctor { get => _Doctor; set => _Doctor = value; }
|
||||||
|
[DataMember]
|
||||||
|
public virtual Patient Patient { get => _Patient; set => _Patient = value; }
|
||||||
|
[DataMember]
|
||||||
|
public virtual Origin Origin { get => _Origin; set => _Origin = value; }
|
||||||
|
|
||||||
|
|
||||||
|
public Exam() { }
|
||||||
|
public Exam(bool sicknessstatus, string sicknessdesignation, Result result, Doctor doctor, Patient patient, Origin origin )
|
||||||
|
{
|
||||||
|
this.SicknessStatus = sicknessstatus;
|
||||||
|
this.SicknessDesignation = sicknessdesignation;
|
||||||
|
this.Result = result;
|
||||||
|
this.Doctor = doctor;
|
||||||
|
this.Patient = patient;
|
||||||
|
this.Origin = origin;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +1,32 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using Web_Server_EHEC.Model;
|
||||||
|
|
||||||
namespace Web_Server_EHEC.DAL
|
namespace Web_Server_EHEC.DAL
|
||||||
{
|
{
|
||||||
|
[DataContract]
|
||||||
public class PatientDAL
|
public class PatientDAL
|
||||||
{
|
{
|
||||||
|
public class Patient : Person
|
||||||
|
{
|
||||||
|
private int _PatientId;
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public int Patientid { get => _PatientId; set => _PatientId = value; }
|
||||||
|
|
||||||
|
public Patient() { }
|
||||||
|
public Patient(string firstName, string lastName, DateTime birthdate, string street, string city)
|
||||||
|
{
|
||||||
|
this.Firstname = firstName;
|
||||||
|
this.Lastname = lastName;
|
||||||
|
this.Street = street;
|
||||||
|
this.City = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue