/// <summary>
 /// I constructoren sker to ting:
 /// 1) Vi sætter _catalog til at referere til et Catalog-objekt, ved hjælp
 ///    af den abstrake metode GenerateCatalog().
 /// 2) Vi beder om at blive notificeret, hvis der sker ændringer i det
 ///    underliggende Catalog-objekt.
 /// </summary>
 protected PageViewModelBaseV2()
 {
     //_dvmFactory = new DataViewModelFactory<T, TDataViewModel>();
     _catalog          = GetCatalog();
     _deleteCommandObj = new DeleteCommand <T, TDataViewModel>(_catalog, this);
     _UpdateCommandObj = new UpdateCommand <T, TDataViewModel>(_catalog, this);
 }
Пример #2
0
 public void PrintMoviesDirectedInYear(iCatalog catalog, int year)
 {
     catalog.m_directors.ForEach((iDirector obj) =>
                                 obj
                                 .getMoviesByYear(year)
                                 .ForEach((iMovie movie) => Console.WriteLine(movie.getDescription())));
 }
Пример #3
0
        public List <iMovie> getMoviesBetween(iCatalog catalog, int fromYear, int toYear)
        {
            List <iMovie> list = new List <iMovie>();

            catalog.m_directors.ForEach((iDirector obj) => list.AddRange(obj.m_movies.FindAll((iMovie movie) => movie.Year >= fromYear && movie.Year <= toYear)));

            return(list);
        }
Пример #4
0
 public CreateCommand(iCatalog <T> catalog, iPageViewModel <TDataViewModel> pageViewModel) : base(catalog,
                                                                                                  pageViewModel)
 {
 }
Пример #5
0
 public UpdateTicketCommand(iCatalog <Ticket> catalog, iPageViewModel <TicketDataViewModel> pageViewModel)
     : base(catalog, pageViewModel)
 {
 }
Пример #6
0
 public CreatePageViewModelBase()
 {
     _catalog             = DomainModel.GetCatalog <T>();
     _createCommandObject = new CreateCommand <T, TDataViewModel>(_catalog, this);
 }
Пример #7
0
 protected CRUDCommandBase(iCatalog <T> catalog, iPageViewModel <TDataViewModel> pageViewModel)
 {
     _catalog       = catalog;
     _pageViewModel = pageViewModel;
 }
Пример #8
0
 public List <iMovie> getMoviesBetween(iCatalog catalog, int fromYear)
 {
     return(getMoviesBetween(catalog, fromYear, DateTime.Now.Year));
 }
Пример #9
0
 protected PageViewModelBase()
 {
     _itemSelected     = null;
     _catalog          = GetCatalog();
     _deleteCommandObj = new DeleteCommand <T, TDataViewModel>(_catalog, this);
 }