/// <summary> /// Initialzies a new instance of the AddClientViewModel class /// </summary> /// <param name="parent">The parent window</param> public AddClientViewModel(ClientsViewModel parent) { m_parent = parent; m_clientBl = new ClientsBL(); SaveCommand = new RelayCommand(Save, p => CanSave); CancelCommand = new RelayCommand(Close); }
public ClientsViewModel(IClientsBL clientsBL) { m_clientsBL = clientsBL; AddClientCommand = new RelayCommand(AddClient); DeleteClientCommand = new RelayCommand(DeleteClient, p => CanModifyClient); UpdateClientCommand = new RelayCommand(UpdateClient, p => CanModifyClient); Clients = new ObservableCollection <Client>(); m_refreshTimer = new Timer(Refresh, null, GlobalConstants.NoRefreshInterval, GlobalConstants.NoRefreshInterval); RefreshClients(); StartTimer(); }
public ClientsController(IClientsBL IClientsBL) { _IClientsBL = IClientsBL; }