oop_II-6/EHEC_Server/EHEC_Server/cluster_dependencies/Models/ClusterPatient.cs

34 lines
922 B
C#
Raw Normal View History

2018-07-17 19:51:33 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace EHEC_Server
{
public class ClusterPatient
{
2018-07-17 21:05:13 +02:00
public List<Patient> Patients { get; set; }
public List<ClusterPatient> ClusterPatients { get; set; }
public int Id { get; set; }
public string Name { get; set; }
2018-07-17 19:51:33 +02:00
2018-07-17 21:05:13 +02:00
public List<ClusterPatient> GetClusterPatients()
2018-07-17 19:51:33 +02:00
{
Patients = Global.GlobalInstance.DbAccess.Patients.ToList();
foreach (Patient element in Patients)
{
ClusterPatient clusterPatient = new ClusterPatient
{
Id = element.PatientId,
Name = element.FirstName + " " + element.LastName
};
2018-07-17 21:16:24 +02:00
this.ClusterPatients.Add(clusterPatient);
2018-07-17 19:51:33 +02:00
}
return ClusterPatients;
}
}
}