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);
            }
        }
Beispiel #2
0
 public void Consume(PaymentLevelDeactivated message)
 {
     _eventHandlers.Consume(message);
 }
Beispiel #3
0
 public void Handle(PaymentLevelDeactivated @event)
 {
     AddActivityLog(AdminActivityLogCategory.PaymentLevel, @event);
 }