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 <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); }
public static ObservableCollection <ZoneEspeceViewModel> listeZones() { ObservableCollection <DAOZoneEspece> listeDAO = DAOZoneEspece.listeZones(); ObservableCollection <ZoneEspeceViewModel> listeZones = new ObservableCollection <ZoneEspeceViewModel>(); foreach (DAOZoneEspece item in listeDAO) { int idZone = item.IdZoneDAO; int idEspece = item.IdEspeceDAO; int idEtude = item.IdEtudeDAO; int idPlage = item.IdPlageDAO; ZonePrelevementViewModel zoneID = ORMZonePrelevement.getZone(idZone); EspèceViewModel especeID = ORMEspèce.getEspèce(idEspece); EtudeViewModel etudeID = ORMEtude.getEtude(idEtude); PlageViewModel plageID = ORMPlage.getPlage(idPlage); ZoneEspeceViewModel zone = new ZoneEspeceViewModel(item.idZoneEDAO, especeID, zoneID, etudeID, plageID, item.NombreDAO); listeZones.Add(zone); } return(listeZones); }