public MainWindowViewModel(IDataAccessService dataAccessService, ViewModelLocator viewModelLocator) { _dataAccessService = dataAccessService; _viewModelLocator = viewModelLocator; OpenClientManagerCommand = new RelayCommand(SetCurrentVMToClientVM); }
public ClientViewModel(IDataAccessService dataAccessService, ViewModelLocator viewModelLocator) { _dataAccessService = dataAccessService; _viewModelLocator = viewModelLocator; //_clients = new ObservableCollection<Client>(); //GetClients(); _clients = _dataAccessService.GetClients(); OpenExistedClientTabCommand = new RelayCommand<Client>(OpenExistedClientTab); // Register the Tab Close Messenger Messenger.Default.Register<Client>(this, "CloseClientTabItem", CloseClientTab); }