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); }
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); }
public static void insertPlage(PlageDAO p) { PlageDAL.insertPlage(p); }
public static void updatePlage(PlageDAO p) { PlageDAL.updatePlage(p); }
public static PlageDAO getPlage(int idPlage) { PlageDAO p = PlageDAL.getPlage(idPlage); return(p); }
public static void insertPlage(PlageViewModel p) { PlageDAO.insertPlage(new PlageDAO(p.idPlageProperty, p.nomPlageProperty, p.superficEtudePlageProperty, p.CommunePlageProperty.idCommuneProperty)); }
public static void supprimerPlage(int id) { PlageDAO.supprimerPlage(id); }