コード例 #1
0
        private void GetByIdOperation()
        {
            long id = -1;

            while (id < 0)
            {
                id = view.EnterId();
            }
            switch (view.entity)
            {
            case Entity.Ticket:
                List <Ticket> tickets = new List <Ticket>()
                {
                    ticketDAO.Get(id)
                };
                view.PrintTicket(tickets);
                break;

            case Entity.Seance:
                List <Seance> seances = new List <Seance>()
                {
                    seanceDAO.Get(id)
                };
                view.PrintSeances(seances);
                break;

            case Entity.Movie:
                List <Movie> movies = new List <Movie>()
                {
                    movieDAO.Get(id)
                };
                view.PrintMovies(movies);
                break;
            }
        }