Esempio n. 1
0
        public void Consume(BankAccountDeactivated message)
        {
            var bankAccount = _playerRepository.BankAccounts
                              .Single(o => o.Id == message.Id);

            bankAccount.BankAccountStatus = BankAccountStatus.Pending;

            _playerRepository.BankAccounts.AddOrUpdate(bankAccount);
            _playerRepository.SaveChanges();
        }
Esempio n. 2
0
        public void Deactivate(Guid bankAccountId, string remarks)
        {
            var bankAccount = _repository.GetBankAccount(bankAccountId);

            bankAccount.Deactivate(_actorInfoProvider.Actor.UserName, remarks);
            _repository.SaveChanges();

            var account = _repository.BankAccounts
                          //.Include(x => x.Bank.Brand)
                          .Single(x => x.Id == bankAccountId);

            var bankAccountDeactivated = new BankAccountDeactivated
            {
                Id              = account.Id,
                Name            = account.AccountName,
                Number          = account.AccountNumber,
                Remarks         = remarks,
                DeactivatedBy   = account.UpdatedBy,
                DeactivatedDate = account.Updated.Value,
                EventCreated    = account.Updated.Value,
            };

            _eventBus.Publish(bankAccountDeactivated);
        }
 public void Consume(BankAccountDeactivated message)
 {
     _eventHandlers.Handle(message);
 }
Esempio n. 4
0
 public void Handle(BankAccountDeactivated @event)
 {
     AddActivityLog(AdminActivityLogCategory.BankAccount, @event);
 }