public DailySummaryViewModel(IEventAggregator eventAggregator, ITabControlService tabControlService, ITimesheetMemberService timesheetMemberService, IIdentityService identityService, ITimesheetService timesheetService) : base(tabControlService) { _timesheetService = timesheetService; _identityService = identityService; _eventAggregator = eventAggregator; _eventAggregator.GetEvent <DailySummaryUpdatedEvent>().Subscribe(DailySummaryUpdated); _timesheetMemberService = timesheetMemberService; ListOfSelectedData = new ObservableCollection <TimesheetDailySummary>(); Title = "Daily Summary Data"; AddToListCommand = new DelegateCommand(AddToList, CanBeConfirmed).ObservesProperty(() => SelectedDailySummary); ConfirmCommand = new DelegateCommand(ConfirmRequest, CanBeConfirmed).ObservesProperty(() => SelectedDailySummary); ConfirmListCommand = new DelegateCommand(ConfirmListRequest, CanListBeConfirmed) .ObservesProperty(() => TotalRecords) .ObservesProperty(() => SelectedMember); ClearListCommand = new DelegateCommand(ClearListOfSelected, CanClearList).ObservesProperty(() => TotalRecords); LoadMembers(); }
public ToolbarViewModel(IEventAggregator eventAggregator, ITimesheetService timesheetService, IRegionManager regionManager, ITabControlService tabControlService) { RequestData = new DelegateCommand(GetTimesheetData, CanExecuteRequest) .ObservesProperty(() => EmailAddress) .ObservesProperty(() => StartDate) .ObservesProperty(() => EndDate); _eventAggregator = eventAggregator; _regionManager = regionManager; _tabControlService = tabControlService; _timesheetService = timesheetService; NotificationRequest = new InteractionRequest <INotification>(); BackCommand = new DelegateCommand(GoBack).ObservesCanExecute(p => CanGoBack); GlobalCommands.NavigationBackCommand.RegisterCommand(BackCommand); StartDate = DateTime.Now; EndDate = DateTime.Now; }
public TabViewModelBase(ITabControlService tabControlService) { _tabControlService = tabControlService; }