コード例 #1
0
        public static ZoneInvestigationViewModel getZoneInvestigation(int idZoneInvestigation)
        {
            ZoneInvestigationDAO pDAO = ZoneInvestigationDAO.getZoneInvestigation(idZoneInvestigation);

            int            idEtude = pDAO.IdEtudeDAO;
            EtudeViewModel a       = EtudeORM.getEtude(idEtude);

            DateTime       EtudeDate = pDAO.EtudeDateDAO;
            EtudeViewModel b         = EtudeORM.getEtude(idEtude);

            int            idUsers = pDAO.IdUsersDAO;
            UsersViewModel c       = UsersORM.getUsers(idUsers);

            int            idPlage = pDAO.IdPlageDAO;
            PlageViewModel d       = PlageORM.getPlage(idPlage);

            ZoneInvestigationViewModel p = new ZoneInvestigationViewModel(pDAO.IdZoneDAO, a, d, b, pDAO.NomZoneDAO, pDAO.Angle1DAO, pDAO.Angle2DAO, pDAO.Angle3DAO, pDAO.Angle4DAO, c);

            return(p);
        }
コード例 #2
0
        public static ObservableCollection <ZoneInvestigationViewModel> ListeZoneInvestigation()
        {
            ObservableCollection <ZoneInvestigationDAO>       lDAO = ZoneInvestigationDAO.listeZoneInvestigations();
            ObservableCollection <ZoneInvestigationViewModel> l    = new ObservableCollection <ZoneInvestigationViewModel>();

            foreach (ZoneInvestigationDAO element in lDAO)
            {
                int            idEtude = element.IdEtudeDAO;
                EtudeViewModel a       = EtudeORM.getEtude(idEtude);

                DateTime       EtudeDate = element.EtudeDateDAO;
                EtudeViewModel b         = EtudeORM.getEtude(idEtude);

                int            idUsers = element.IdUsersDAO;
                UsersViewModel c       = UsersORM.getUsers(idUsers);

                int                        idPlage = element.IdPlageDAO;
                PlageViewModel             d       = PlageORM.getPlage(idPlage);
                ZoneInvestigationViewModel p       = new ZoneInvestigationViewModel(element.IdZoneDAO, a, d, b, element.NomZoneDAO, element.Angle1DAO, element.Angle2DAO, element.Angle3DAO, element.Angle4DAO, c);
                l.Add(p);
            }
            return(l);
        }