Пример #1
0
        public void UpdateRecord(TableElement newElement)
        {
            Type typeOfTableElement = newElement.GetType();

            if (typeOfTableElement == typeof(Film))
            {
                UpdateFilm(newElement as Film);
            }
            else if (typeOfTableElement == typeof(Seance))
            {
                UpdateSeance(newElement as Seance);
            }
            else if (typeOfTableElement == typeof(Seller))
            {
                UpdateSeller(newElement as Seller);
            }
            else if (typeOfTableElement == typeof(CinemaRoom))
            {
                UpdateCinemaRoom(newElement as CinemaRoom);
            }
            else if (typeOfTableElement == typeof(SoldTicket))
            {
                UpdateTicket(newElement as SoldTicket);
            }
        }