public void Initialize()
        {
            if (ProgrammeData == null)
            {
                ProgrammeData = new SortedBindingList <TVTProgramme>();
            }

            //if ( EpisodeData == null )
            //    EpisodeData = new SortedBindingList<TVTEpisode>();

            if (PersonData == null)
            {
                PersonData = new SortedBindingList <TVTPerson>();
            }

            if (AdvertisingData == null)
            {
                AdvertisingData = new SortedBindingList <TVTAdvertising>();
            }

            if (NewsData == null)
            {
                NewsData = new SortedBindingList <TVTNews>();
            }
        }
Ejemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            database = new TVTBindingListDatabaseOld();
            database.Initialize();

            var movieDataList = new SortedBindingList <TVTProgramme>();

            // Allow new parts to be added, but not removed once committed.
            movieDataList.AllowNew    = true;
            movieDataList.AllowRemove = true;

            // Raise ListChanged events when new parts are added.
            movieDataList.RaiseListChangedEvents = true;

            movieDataList.AllowEdit = true;

            movieDataGrid.DataSource = movieDataList;
            database.ProgrammeData   = movieDataList;



            var personDataList = new SortedBindingList <TVTPerson>();

            // Allow new parts to be added, but not removed once committed.
            personDataList.AllowNew    = true;
            personDataList.AllowRemove = true;

            // Raise ListChanged events when new parts are added.
            personDataList.RaiseListChangedEvents = true;

            personDataList.AllowEdit = true;

            actorDataGrid.DataSource = personDataList;
            database.PersonData      = personDataList;
        }
 public void SetPersonBindingList(SortedBindingList <TVTPerson> personData)
 {
     this.PersonData = personData;
 }
 public void SetMovieBindingList(SortedBindingList <TVTProgramme> movieData)
 {
     this.ProgrammeData = movieData;
 }