コード例 #1
0
ファイル: UITicket.cs プロジェクト: clleker/MovieAPP
 void GetFilms()
 {
     dgvMovieList.DataSource = (from m in _movieService.GetAll()
                                join mst in _theaterService.GetAll() on m.ID equals mst.MovieId
                                join sa in _saloonService.GetAll() on mst.SaloonId equals sa.ID
                                join s in _seanceService.GetAll() on mst.SeanceId equals s.ID
                                select new { ID = mst.ID, Film = m.Name, Salon = sa.Name, Seans = s.Time, Gun = mst.Day }).ToList();
 }
コード例 #2
0
ファイル: UITheater.cs プロジェクト: clleker/MovieAPP
 void GetAllTheater()
 {
     dgvTheater.DataSource = (from m in _movieService.GetAll()
                              join tm in _theaterService.GetAll() on m.ID equals tm.MovieId
                              join sa in _saloonService.GetAll() on tm.SaloonId equals sa.ID
                              join s in _seanceService.GetAll() on tm.SeanceId equals s.ID
                              select new { tm.ID, Film = m.Name, Salon = sa.Name, Seans = s.Time, Gun = tm.Day }
                              ).ToList();
 }
コード例 #3
0
 // api/theaters?type=cinemas
 public IEnumerable <TheaterListDTO> Get(string type = "")
 {
     if (string.IsNullOrEmpty(type))
     {
         return(_theaterService.GetAll());
     }
     else if (type == "cinemas")
     {
         return(_theaterService.GetAllCinemas());
     }
     else if (type == "theaters")
     {
         return(_theaterService.GetAllPlayTheaters());
     }
     else
     {
         throw new HttpResponseException(HttpStatusCode.BadRequest);
     }
 }