public override void Handle(PaymentTypeEvents.Created message) { PaymentTypeDto dto = this.Load(message.PaymentTypeId); if (dto != null) throw new Exception("Item with the same Id already created!"); dto = new PaymentTypeDto(); dto.PaymentTypeId = message.PaymentTypeId; this.Save(dto); }
public void When(PaymentTypeEvents.Deleted e) { }
public void When(PaymentTypeEvents.IsCreditChanged e) { this.IsCredit = e.IsCredit; }
public void When(PaymentTypeEvents.NameChanged e) { this.Name = e.Name; }
public void When(PaymentTypeEvents.Created e) { this.PaymentTypeId = e.PaymentTypeId; }
public override void Handle(PaymentTypeEvents.Deleted message) { this.Delete<PaymentTypeDto>(message.PaymentTypeId); }
public override void Handle(PaymentTypeEvents.IsCreditChanged message) { PaymentTypeDto dto = this.Load(message.PaymentTypeId); dto.IsCredit = message.IsCredit; this.Save(dto); }
public override void Handle(PaymentTypeEvents.NameChanged message) { PaymentTypeDto dto = this.Load(message.PaymentTypeId); dto.Name = message.Name; this.Save(dto); }