public void When(SupplierEvents.BankAccountRemoved e)
 {
     if (this.BankAccountList == null)
         return;
     
     this.BankAccountList.Remove(e.BankAccount);
 }
Example #2
0
 public override void Handle(SupplierEvents.Created message)
 {
     SupplierDto dto = this.Load(message.SupplierId);
     if (dto != null) throw new Exception("Item with the same Id already created!");
     dto = new SupplierDto();
     dto.SupplierId = message.SupplierId;
     this.Save(dto);
 }
 public void When(SupplierEvents.BankAccountAdded e)
 {
     if (this.BankAccountList == null)
         this.BankAccountList = new List<BankAccount>();
     this.BankAccountList.Add(e.BankAccount);
 }
 public void When(SupplierEvents.NoteChanged e)
 {
     this.Note = e.Note;
 }
 public void When(SupplierEvents.CompanyChanged e)
 {
     this.CompanyId = e.CompanyId;
 }
 public void When(SupplierEvents.NameChanged e)
 {
     this.Name = e.Name;
 }
 public void When(SupplierEvents.Created e)
 {
     this.SupplierId = e.SupplierId;
 }
Example #8
0
 public override void Handle(SupplierEvents.BankAccountRemoved message)
 {
     SupplierDto dto = this.Load(message.SupplierId);
     dto.BankAccountList.Remove(message.BankAccount);
     this.Save(dto);
 }
Example #9
0
 public override void Handle(SupplierEvents.NoteChanged message)
 {
     SupplierDto dto = this.Load(message.SupplierId);
     dto.Note = message.Note;
     this.Save(dto);
 }
Example #10
0
 public override void Handle(SupplierEvents.CompanyChanged message)
 {
     SupplierDto dto = this.Load(message.SupplierId);
     dto.CompanyId = message.CompanyId;
     this.Save(dto);
 }