public List <ConsultLabel> HistoriqueMedecin() { List <ConsultLabel> list = new List <ConsultLabel>(); //Personne perso = (from personne in Globals.DataClass.Personne // where nomMedecin == personne.nom && prenomMedecin == personne.prenom // select personne).First<Personne>(); //Medecin med = (from medecin in Globals.DataClass.Medecin // where perso.Id == medecin.IdPersonne // select medecin).First<Medecin>(); IQueryable <Consultation> cnslt = (from mpc in Globals.DataClass.MPConsultation where mpc.IdMedecin == Globals.IdMedecin join cns in Globals.DataClass.Consultation on mpc.IdConsultation equals cns.Id select cns); foreach (Consultation p in cnslt) { MPConsultation mpcnslt = (from mpc in Globals.DataClass.MPConsultation where mpc.IdConsultation == p.Id select mpc).First <MPConsultation>(); Patient pat = (from patient in Globals.DataClass.Patient where patient.Id == mpcnslt.IdPatient select patient).First <Patient>(); Personne pers = (from personne in Globals.DataClass.Personne where personne.Id == pat.IdPersonne select personne).First <Personne>(); ConsultLabel q = new ConsultLabel((DateTime)p.date, p.label, p.Id, pers.nom, pers.prenom); list.Add(q); } return(list); }
public List <ConsultLabel> Suivie(string nomPatient, string prenomPatient) { nomPatient = nomPatient.ToUpper(); prenomPatient = prenomPatient.ToUpper(); List <ConsultLabel> list = new List <ConsultLabel>(); Personne Pers = (from personne in Globals.DataClass.Personne where nomPatient == personne.nom && prenomPatient == personne.prenom select personne).First <Personne>(); Patient Pat = (from patient in Globals.DataClass.Patient where patient.IdPersonne == Pers.Id select patient).First <Patient>(); IQueryable <Consultation> cnslt = (from cns in Globals.DataClass.MPConsultation where cns.IdPatient == Pat.Id join mpc in Globals.DataClass.Consultation on cns.IdConsultation equals mpc.Id select mpc); foreach (Consultation p in cnslt) { ConsultLabel q = new ConsultLabel((DateTime)p.date, p.label, p.Id, nomPatient, prenomPatient); list.Add(q); } return(list); }
public List <ConsultLabel> Historique() { List <ConsultLabel> list = new List <ConsultLabel>(); IQueryable <Consultation> cnslt = (from cns in Globals.DataClass.Consultation select cns); foreach (Consultation p in cnslt) { IQueryable <MPConsultation> mpconslt = (from mpc in Globals.DataClass.MPConsultation where mpc.IdConsultation == p.Id select mpc); if (mpconslt.Count() != 0) { MPConsultation mpcnslt = mpconslt.First <MPConsultation>(); Patient pat = (from patient in Globals.DataClass.Patient where patient.Id == mpcnslt.IdPatient select patient).First <Patient>(); Personne pers = (from personne in Globals.DataClass.Personne where personne.Id == pat.IdPersonne select personne).First <Personne>(); Medecin patmed = (from medecin in Globals.DataClass.Medecin where medecin.Id == mpcnslt.IdMedecin select medecin).First <Medecin>(); Personne persmed = (from personne in Globals.DataClass.Personne where personne.Id == patmed.IdPersonne select personne).First <Personne>(); ConsultLabel q = new ConsultLabel((DateTime)p.date, p.label, p.Id, pers.nom, pers.prenom, persmed.nom, persmed.prenom); list.Add(q); } } return(list); }
public List <ConsultLabel> RechercheConsultationDate(DateTime date) { List <ConsultLabel> list = new List <ConsultLabel>(); IQueryable <Consultation> cnslt = (from cns in Globals.DataClass.Consultation where cns.date == date select cns); foreach (Consultation p in cnslt) { MPConsultation mpcnslt = (from mpc in Globals.DataClass.MPConsultation where mpc.IdConsultation == p.Id select mpc).First(); Patient pat = (from patient in Globals.DataClass.Patient where patient.Id == mpcnslt.IdPatient select patient).First(); Personne pers = (from personne in Globals.DataClass.Personne where personne.Id == pat.IdPersonne select personne).First(); ConsultLabel q = new ConsultLabel((DateTime)p.date, p.label, p.Id, pers.nom, pers.prenom); list.Add(q); } return(list); }