public MainWindowViewModel(IDataAccessService dataAccessService, ViewModelLocator viewModelLocator)
        {
            _dataAccessService = dataAccessService;
            _viewModelLocator = viewModelLocator;

            OpenClientManagerCommand = new RelayCommand(SetCurrentVMToClientVM);
        }
Beispiel #2
0
        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);
        }