Example #1
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);
        }