public FilterJournalViewModel(Filter filter ) { ClearCommand = new RelayCommand(OnClear); Title = "Настройки фильтра"; DateTimeViewModel = new DateTimeViewModel(filter); FilterEventsViewModel = new FilterEventsViewModel(filter); FilterConsumersViewModel = new FilterConsumersViewModel(filter); FilterDevicesViewModel = new FilterDevicesViewModel(filter); FilterTariffsViewModel = new FilterTariffsViewModel(filter); FilterUsersViewModel = new FilterUsersViewModel(filter); }
void OnClear() { DateTimeViewModel = new DateTimeViewModel(new Filter()); FilterEventsViewModel = new FilterEventsViewModel(new Filter()); FilterConsumersViewModel = new FilterConsumersViewModel(new Filter()); FilterDevicesViewModel = new FilterDevicesViewModel(new Filter()); FilterTariffsViewModel = new FilterTariffsViewModel(new Filter()); FilterUsersViewModel = new FilterUsersViewModel(new Filter()); OnPropertyChanged(() => DateTimeViewModel); OnPropertyChanged(() => FilterEventsViewModel); OnPropertyChanged(() => FilterConsumersViewModel); OnPropertyChanged(() => FilterDevicesViewModel); OnPropertyChanged(() => FilterTariffsViewModel); OnPropertyChanged(() => FilterUsersViewModel); }