Esempio n. 1
0
        private void AddOperation()
        {
            switch (view.entity)
            {
            case Entity.Movie:
                Movie m = view.MovieAddOrUpdateEnter();
                movieDAO.Create(m);
                break;

            case Entity.Seance:
                Seance s = view.SeanceAddOrUpdateEnter(movieDAO.GetList(), hallDAO.GetHalls());
                seanceDAO.Create(s);
                break;

            case Entity.Ticket:
                Ticket t       = view.TicketAddOrUpdateGetSeance(seanceDAO.GetList());
                long   hall_id = seanceDAO.Get(t.Seance_id).Hall_id;
                t = view.TicketAddOrUpdateGetSeat(hallDAO.GetSeatsInHall(hall_id), t);
                ticketDAO.Create(t);
                break;
            }
        }