コード例 #1
0
        public static List <MovieDTO> getMovieListbyActor(Actor actorDB)
        {
            List <MovieDTO> movies = new List <MovieDTO>();

            foreach (Movie m in JobServiceDB.DBaccess.Movie)
            {
                if (m.idActor == actorDB.id)
                {
                    MovieDTO movieDTO = JobServiceDB.mapMovieDTOfromDB(m);
                    movies.Add(movieDTO);
                }
            }

            return(movies);
        }
コード例 #2
0
        public static List <ConcertDTO> getConcertListbyMusician(Musician musicianDB)
        {
            List <ConcertDTO> concerts = new List <ConcertDTO>();

            foreach (Concert c in JobServiceDB.DBaccess.Concert)
            {
                if (c.idMusician == musicianDB.id)
                {
                    ConcertDTO concertDTO = JobServiceDB.mapConcertDTOfromDB(c);
                    concerts.Add(concertDTO);
                }
            }

            return(concerts);
        }
コード例 #3
0
 public static void quitConcert(MusicianDTO musicianDTO, ConcertDTO concertDTO)
 {
     JobServiceDB.getConcertById(concertDTO.Id).Job.assigned = false;
     JobServiceDB.getConcertById(concertDTO.Id).idMusician   = null;
     JobServiceDB.DBaccess.SaveChanges();
 }
コード例 #4
0
 public static void quitMovie(ActorDTO actorDTO, MovieDTO movieDTO)
 {
     JobServiceDB.getMovieById(movieDTO.Id).Job.assigned = false;
     JobServiceDB.getMovieById(movieDTO.Id).idActor      = null;
     JobServiceDB.DBaccess.SaveChanges();
 }