public static EtudeViewModel getEtude(int id) { DAOEtude daoetude = DAOEtude.getEtude(id); int idPersonne = daoetude.idPersonneDAO; PersonneViewModel personne = ORMPersonne.getPersonne(idPersonne); EtudeViewModel etude = new EtudeViewModel(daoetude.idEtudeDAO, daoetude.nomEtudeDAO, daoetude.dateDAO, personne); return(etude); }
public static ZonePrelevementViewModel getZone(int id) { DAOZonePrelevement daozone = DAOZonePrelevement.getZone(id); int idEtude = daozone.idEtudeDAO; int idPlage = daozone.idPlageDAO; int idPersonne = daozone.idPersonneDAO; EtudeViewModel etude = ORMEtude.getEtude(idEtude); PlageViewModel plage = ORMPlage.getPlage(idPlage); PersonneViewModel personne = ORMPersonne.getPersonne(idPersonne); ZonePrelevementViewModel zone = new ZonePrelevementViewModel(daozone.idZoneDAO, etude, plage, daozone.Angle1DAO, daozone.Angle2DAO, daozone.Angle3DAO, daozone.Angle4DAO, personne); return(zone); }
public static ObservableCollection <EtudeViewModel> listeEtudes() { ObservableCollection <DAOEtude> listeDAO = DAOEtude.listeEtudes(); ObservableCollection <EtudeViewModel> listeEtudes = new ObservableCollection <EtudeViewModel>(); foreach (DAOEtude item in listeDAO) { int idPersonne = item.idPersonneDAO; PersonneViewModel personneID = ORMPersonne.getPersonne(idPersonne); EtudeViewModel etude = new EtudeViewModel(item.idEtudeDAO, item.nomEtudeDAO, item.dateDAO, personneID); listeEtudes.Add(etude); } return(listeEtudes); }
public static ObservableCollection <ZonePrelevementViewModel> listeZones() { ObservableCollection <DAOZonePrelevement> listeDAO = DAOZonePrelevement.listeZones(); ObservableCollection <ZonePrelevementViewModel> listeZones = new ObservableCollection <ZonePrelevementViewModel>(); foreach (DAOZonePrelevement item in listeDAO) { int idEtude = item.idEtudeDAO; int idPlage = item.idPlageDAO; int idPersonne = item.idPersonneDAO; EtudeViewModel etudeID = ORMEtude.getEtude(idEtude); PlageViewModel plageID = ORMPlage.getPlage(idPlage); PersonneViewModel personneID = ORMPersonne.getPersonne(idPersonne); ZonePrelevementViewModel zone = new ZonePrelevementViewModel(item.idZoneDAO, etudeID, plageID, item.Angle1DAO, item.Angle2DAO, item.Angle3DAO, item.Angle4DAO, personneID); listeZones.Add(zone); } return(listeZones); }