コード例 #1
0
 public PlageViewModel(int id, string nom, CommuneViewModel commune, PrelevementViewModel prelevement, DepartementViewModel departement)
 {
     this.idPlage         = id;
     this.nomProperty     = nom;
     communeViewModel     = commune;
     prelevementViewModel = prelevement;
     departementViewModel = departement;
 }
コード例 #2
0
        public static CommuneViewModel getCommune(int idVille)
        {
            CommuneDAO pDAO = CommuneDAO.getCommune(idVille);
            //int idMetier = pDAO.idMetierCommuneDAO;
            CommuneViewModel p = new CommuneViewModel(pDAO.idVilleDAO, pDAO.nomVilleDAO, pDAO.nomSpecialisteDAO);

            return(p);
        }
コード例 #3
0
        public static ObservableCollection <CommuneViewModel> listeCommunes()
        {
            ObservableCollection <CommuneDAO>       lDAO = CommuneDAO.listeCommunes();
            ObservableCollection <CommuneViewModel> l    = new ObservableCollection <CommuneViewModel>();

            foreach (CommuneDAO element in lDAO)
            {
                //int idMetier = element.idMetierCommuneDAO;

                CommuneViewModel p = new CommuneViewModel(element.idVilleDAO, element.nomVilleDAO, element.nomSpecialisteDAO);
                l.Add(p);
            }
            return(l);
        }
コード例 #4
0
 public static void insertCommune(CommuneViewModel p)
 {
     CommuneDAO.insertCommune(new CommuneDAO(p.idVilleProperty, p.nomVilleProperty, p.nomSpecialisteProperty));
 }