示例#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);
 }