public void Consume(PaymentLevelDeactivated @event)
        {
            var repository = _container.Resolve <IFraudRepository>();

            //There msut be a logic here that changes the values of the columns DeactivatedBy, DateDeactivated(For now the columns are missing)
            try
            {
                var recordToBeUpdated = repository
                                        .PaymentLevels.SingleOrDefault(rec => rec.Id == @event.Id);

                if (recordToBeUpdated != null)
                {
                    recordToBeUpdated.Status = (Interface.Data.PaymentLevelStatus)PaymentLevelStatus.Inactive;
                    repository.SaveChanges();
                }
            }
            catch (Exception e)
            {
                throw new RegoException(e.Message);
            }
        }
Exemplo n.º 2
0
 public void Consume(PaymentLevelDeactivated message)
 {
     _eventHandlers.Consume(message);
 }
Exemplo n.º 3
0
 public void Handle(PaymentLevelDeactivated @event)
 {
     AddActivityLog(AdminActivityLogCategory.PaymentLevel, @event);
 }