示例#1
0
 /// <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);
 }
示例#2
0
        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();
        }
示例#3
0
 public ClientsController(IClientsBL IClientsBL)
 {
     _IClientsBL = IClientsBL;
 }