Beispiel #1
0
 public ComptageViewModel(int nbDeParticipants, EtudeViewModel etude, PlageViewModel plage, PersonneViewModel personne, NbEspecesViewModel nbEspeces, string coordonnees)
 {
     this.nbDeParticipants = nbDeParticipants;
     this.etude            = etude;
     this.plage            = plage;
     this.personne         = personne;
     this.nbEspeces        = nbEspeces;
     this.coordonnees      = coordonnees;
 }
        public static EtudeViewModel getEtude(int id)
        {
            DAOEtude           pDAO  = DAOEtude.getEtude(id);
            DAOEnsembles       eDAO  = DAOEnsembles.getEnsembles(pDAO.idEnsemblePlagesDAOEtude);
            EnsemblesViewModel e     = new EnsemblesViewModel(eDAO.idDAOEnsemblePlage, eDAO.nomDAOEnsemblePlage);
            DAOEquipe          eqDAO = DAOEquipe.getEquipe(pDAO.idEquipe);
            EquipeViewModel    eq    = new EquipeViewModel(eqDAO.idDAOEquipe, eqDAO.nomDAOEquipe);
            EtudeViewModel     p     = new EtudeViewModel(pDAO.idDAOEtude, pDAO.titreDAOEtude, e, pDAO.dateDAOEtude, eq);

            return(p);
        }
        public static ObservableCollection <EtudeViewModel> listeEtudes()
        {
            ObservableCollection <DAOEtude> lDAO = DAOEtude.listeEtudes();

            ObservableCollection <EtudeViewModel> l = new ObservableCollection <EtudeViewModel>();

            foreach (DAOEtude element in lDAO)
            {
                DAOEnsembles       eDAO  = DAOEnsembles.getEnsembles(element.idEnsemblePlagesDAOEtude);
                DAOEquipe          eqDAO = DAOEquipe.getEquipe(element.idEquipe);
                EquipeViewModel    eq    = new EquipeViewModel(eqDAO.idDAOEquipe, eqDAO.nomDAOEquipe);
                EnsemblesViewModel e     = new EnsemblesViewModel(eDAO.idDAOEnsemblePlage, eDAO.nomDAOEnsemblePlage);
                EtudeViewModel     p     = new EtudeViewModel(element.idDAOEtude, element.titreDAOEtude, e, element.dateDAOEtude, eq);
                l.Add(p);
            }
            return(l);
        }
Beispiel #4
0
 public void deletedPlageEtude(PlageViewModel plage, EtudeViewModel etude)
 {
     DALPlageEtude.deletedPlageEtude(new DAOPlageEtude(plage.idPlageProperty, etude.idEtudeProperty));
 }
Beispiel #5
0
 public void deletedEtude(EtudeViewModel etude)
 {
     DALPlageEtude.deletedEtude(etude.idEtudeProperty);
 }
 public static void insertEtude(EtudeViewModel p)
 {
     DALEtude.insertEtude(new DAOEtude(p.titreEtudeProperty, p.listePlagesProperty.idEnsembleProperty, p.dateEtudeProperty, p.equipeEtudeProperty.idEquipeProperty));
 }