public static CommuneViewModel getCommune(int idCommune) { CommuneDAO pDAO = CommuneDAO.getCommune(idCommune); int idDepartement = pDAO.DepartementCommuneDAO; DepartementViewModel m = DepartementORM.getDepartement(idDepartement); CommuneViewModel p = new CommuneViewModel(pDAO.idCommuneDAO, pDAO.nomCommuneDAO, pDAO.CodePostaleDAO, m); return(p); }
public static ObservableCollection <CommuneViewModel> ListeCommunes() { ObservableCollection <CommuneDAO> lDAO = CommuneDAO.listeCommunes(); ObservableCollection <CommuneViewModel> l = new ObservableCollection <CommuneViewModel>(); foreach (CommuneDAO element in lDAO) { int idDepartement = element.DepartementCommuneDAO; DepartementViewModel m = DepartementORM.getDepartement(idDepartement); CommuneViewModel p = new CommuneViewModel(element.idCommuneDAO, element.nomCommuneDAO, element.CodePostaleDAO, m); l.Add(p); } return(l); }
public static void insertCommune(CommuneViewModel p) { CommuneDAO.insertCommune(new CommuneDAO(p.idCommuneProperty, p.nomCommuneProperty, p.CodePostaleProperty, p.DepartementCommuneProperty.idDepartementProperty)); }
public static void supprimerCommune(int id) { CommuneDAO.supprimerCommune(id); }
public static void insertCommune(CommuneDAO p) { CommuneDAL.insertCommune(p); }
public static void updateCommune(CommuneDAO p) { CommuneDAL.updateCommune(p); }
public static CommuneDAO getCommune(int idCommune) { CommuneDAO p = CommuneDAL.getCommune(idCommune); return(p); }