public HourCodesViewModel(IHourCodeProvider hourCodeProvider)
 {
     _hourCodeProvider = hourCodeProvider;
     SaveCurrentCodeCommand = new DelegateCommand(SaveCurrentCode);
     RemoveCurrentCodeCommand = new DelegateCommand(RemoveCurrentCode);
     AddCodeCommand = new DelegateCommand(AddCode);
 }
 public HourCodesViewModel(IHourCodeProvider hourCodeProvider)
 {
     _hourCodeProvider        = hourCodeProvider;
     SaveCurrentCodeCommand   = new DelegateCommand(SaveCurrentCode);
     RemoveCurrentCodeCommand = new DelegateCommand(RemoveCurrentCode);
     AddCodeCommand           = new DelegateCommand(AddCode);
 }
 public HourUsageViewModel(IHourCodeProvider hourCodeProvider, WeekViewModel weekViewModel, HourUsage usage)
 {
     _hourCodeProvider  = hourCodeProvider;
     Usage              = usage;
     _weekViewModel     = weekViewModel;
     RemoveCommand      = new DelegateCommand(Remove);
     AddHourCodeCommand = new DelegateCommand(AddHourCode);
     HourCode           = new HourCodeViewModel(_hourCodeProvider, usage.HourCode);
 }
 public WeeksViewModel(IWeekService weekService, IHourCodeProvider hourCodeProvider)
 {
     _weekService      = weekService;
     _hourCodeProvider = hourCodeProvider;
     AddWeekCommand    = new DelegateCommand(AddWeek);
     RemoveWeekCommand = new DelegateCommand(RemoveWeek);
     Weeks             = new ObservableCollection <WeekViewModel>();
     foreach (var week in _weekService.GetRecentWeeks())
     {
         Weeks.Add(new WeekViewModel(_weekService, _hourCodeProvider, week));
     }
     CurrentWeek = Weeks.FirstOrDefault();
 }
 public WeeksViewModel(IWeekService weekService, IHourCodeProvider hourCodeProvider)
 {
     _weekService = weekService;
     _hourCodeProvider = hourCodeProvider;
     AddWeekCommand = new DelegateCommand(AddWeek);
     RemoveWeekCommand = new DelegateCommand(RemoveWeek);
     Weeks = new ObservableCollection<WeekViewModel>();
     foreach(var week in _weekService.GetRecentWeeks())
     {
         Weeks.Add(new WeekViewModel(_weekService, _hourCodeProvider, week));
     }
     CurrentWeek = Weeks.FirstOrDefault();
 }
        public WeekViewModel(IWeekService weekService, IHourCodeProvider hourCodeProvider, Week week)
        {
            _weekService = weekService;
            Week = week;
            _hourCodeProvider = hourCodeProvider;

            Usages = new ObservableCollection<HourUsageViewModel>();
            foreach (var hourUsage in Week.Usages)
            {
                Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, hourUsage));
            }
            SaveWeekCommand = new DelegateCommand(SaveWeek);
            AddUsageCommand = new DelegateCommand(AddUsage);
        }
        public WeekViewModel(IWeekService weekService, IHourCodeProvider hourCodeProvider, Week week)
        {
            _weekService      = weekService;
            Week              = week;
            _hourCodeProvider = hourCodeProvider;

            Usages = new ObservableCollection <HourUsageViewModel>();
            foreach (var hourUsage in Week.Usages)
            {
                Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, hourUsage));
            }
            SaveWeekCommand = new DelegateCommand(SaveWeek);
            AddUsageCommand = new DelegateCommand(AddUsage);
        }
 public HourCodeViewModel(IHourCodeProvider hourCodeProvider, HourCode hourCode)
 {
     HourCode          = hourCode;
     _hourCodeProvider = hourCodeProvider;
     SaveCommand       = new DelegateCommand(Save);
 }
 public HourCodeViewModel(IHourCodeProvider hourCodeProvider, HourCode hourCode)
 {
     HourCode = hourCode;
     _hourCodeProvider = hourCodeProvider;
     SaveCommand = new DelegateCommand(Save);
 }