Beispiel #1
0
//        private void PopulateForTesting()
//        {
//            YearInterventionsViewModel=new YearInterventionsViewModel();
//            YearInterventionsViewModel.Year = 2015;
//            YearInterventionsViewModel.MonthList=new ObjectList<MonthInterventionsViewModel>(true);
//            var currentYearvalues = LocalCache.Instance.InterventionsDictionary[2015];
//
//            foreach (var key in currentYearvalues.Keys)
//            {
//                YearInterventionsViewModel.MonthList.Add(new MonthInterventionsViewModel(currentYearvalues[key])
//                {
//                    MonthName = LocalCache.Instance.MonthsNames[key],
//                });
//            }
//        }

        public void PopulateYearsList()
        {
            YearListViewModel = new YearListViewModel(this);
            YearListViewModel.PopulateYears(LocalCache.Instance.InterventionsDictionary);
        }
 public YearInterventionsViewModel(Dictionary <int, List <LocalIntervention> > interventionsOnMonths, int year, YearListViewModel parent)
 {
     Parent = parent;
     PopulateMonthsInterventions(interventionsOnMonths);
     Year = year;
 }