Пример #1
0
        public static PlageViewModel getPlage(int idPlage)
        {
            PlageDAO         pDAO      = PlageDAO.getPlage(idPlage);
            int              idCommune = pDAO.CommuneDAO;
            CommuneViewModel m         = CommuneORM.getCommune(idCommune);
            PlageViewModel   p         = new PlageViewModel(pDAO.idPlageDAO, pDAO.nomPlageDAO, pDAO.superficEtudePlageDAO, m);

            return(p);
        }
Пример #2
0
        public static ObservableCollection <PlageViewModel> listePlages()
        {
            ObservableCollection <PlageDAO>       lDAO = PlageDAO.listePlages();
            ObservableCollection <PlageViewModel> l    = new ObservableCollection <PlageViewModel>();

            foreach (PlageDAO element in lDAO)
            {
                int idCommune      = element.CommuneDAO;
                CommuneViewModel m = CommuneORM.getCommune(idCommune);
                PlageViewModel   p = new PlageViewModel(element.idPlageDAO, element.nomPlageDAO, element.superficEtudePlageDAO, m);
                l.Add(p);
            }
            return(l);
        }
Пример #3
0
 public static void insertPlage(PlageDAO p)
 {
     PlageDAL.insertPlage(p);
 }
Пример #4
0
 public static void updatePlage(PlageDAO p)
 {
     PlageDAL.updatePlage(p);
 }
Пример #5
0
        public static PlageDAO getPlage(int idPlage)
        {
            PlageDAO p = PlageDAL.getPlage(idPlage);

            return(p);
        }
Пример #6
0
 public static void insertPlage(PlageViewModel p)
 {
     PlageDAO.insertPlage(new PlageDAO(p.idPlageProperty, p.nomPlageProperty, p.superficEtudePlageProperty, p.CommunePlageProperty.idCommuneProperty));
 }
Пример #7
0
 public static void supprimerPlage(int id)
 {
     PlageDAO.supprimerPlage(id);
 }