예제 #1
0
        private void RemoveExecute()
        {
            if (ListClients.Count < IdToRemove + 1) return;

            var cl = new Client
            {
                Id = ListClients[IdToRemove + 1].Id,
                Name = ListClients[IdToRemove + 1].Name,
                CreationDate = ListClients[IdToRemove + 1].CreationDate
            };

            _eventAggregator.GetEvent<RemoveClientEvent>().Publish(cl);
        }
예제 #2
0
        private void ClientUpdated(Client obj)
        {
            Client = obj;
            Clients.Add(obj);
            _eventAggregator.GetEvent<UpdateListClientEvent>().Publish(_clients);

        }
예제 #3
0
        private void Execute()
        {
            LastUpdate = DateTime.Now;

            var cl = new Client
            {
                Id = CountList + 1,
                Name = FirstName,
                CreationDate = DateTime.Now
            };

            _eventAggregator.GetEvent<UpdateEvent>().Publish(LastUpdate.ToString());
            _eventAggregator.GetEvent<UpdateClientEvent>().Publish(cl);
        }