public void ApplyEvent([AggregateId(nameof(FixedPriceJobOrderRegisteredEvent.JobOrderId))] FixedPriceJobOrderRegisteredEvent evt)
 {
     Id                  = evt.JobOrderId;
     CustomerId          = evt.CustomerId;
     ManagerId           = evt.ManagerId;
     Price               = new PositiveMoney(evt.Price, evt.Currency);
     DateOfStart         = evt.DateOfStart;
     DueDate             = evt.DueDate;
     Name                = evt.JobOrderName;
     Number              = evt.JobOrderNumber;
     IsCompleted         = false;
     PurchaseOrderNumber = evt.PurchaseOrderNumber;
     Description         = evt.Description;
 }
 public void Apply(TimeAndMaterialJobOrderRegisteredEvent evt)
 {
     Id = evt.JobOrderId;
     Customer = new CustomerInfo(evt.CustomerId, evt.CustomerName);
     Manager = new ManagerInfo(evt.ManagerId, evt.ManagerName);
     Value = new PositiveMoney(evt.Value, evt.Currency);
     DateOfStart = evt.DateOfStart;
     DateOfExpiration = evt.DateOfExpiration;
     Name = evt.JobOrderName;
     Number = evt.JobOrderNumber; 
     IsCompleted = false;
     PurchaseOrderNumber = evt.PurchaseOrderNumber;
     Description = evt.Description;
 }
Beispiel #3
0
 public void ApplyEvent([AggregateId(nameof(TimeAndMaterialJobOrderRegisteredEvent.JobOrderId))] TimeAndMaterialJobOrderRegisteredEvent evt)
 {
     Id                  = evt.JobOrderId;
     CustomerId          = evt.CustomerId;
     ManagerId           = evt.ManagerId;
     Value               = new PositiveMoney(evt.Value, evt.Currency);
     DateOfStart         = evt.DateOfStart;
     DateOfExpiration    = evt.DateOfExpiration;
     Name                = evt.JobOrderName;
     Number              = evt.JobOrderNumber;
     IsCompleted         = false;
     PurchaseOrderNumber = evt.PurchaseOrderNumber;
     Description         = evt.Description;
 }
Beispiel #4
0
 public void Apply(FixedPriceJobOrderRegisteredEvent evt)
 {
     Id = evt.JobOrderId;
     Customer = new CustomerInfo(evt.CustomerId, evt.CustomerName);
     Manager = new ManagerInfo(evt.ManagerId, evt.ManagerName);
     Price = new PositiveMoney(evt.Price, evt.Currency);
     DateOfStart= evt.DateOfStart;
     DueDate=evt.DueDate;
     Name = evt.JobOrderName;
     Number = evt.JobOrderNumber; 
     IsCompleted = false;
     PurchaseOrderNumber = evt.PurchaseOrderNumber;
     Description = evt.Description;
 }
Beispiel #5
0
 public void ApplyEvent(JobOrderRegisteredEvent evt)
 {
     Id                  = evt.JobOrderId;
     CustomerId          = evt.CustomerId;
     ManagerId           = evt.ManagerId;
     DateOfStart         = evt.DateOfStart;
     DueDate             = evt.DueDate;
     Name                = evt.JobOrderName;
     Number              = evt.JobOrderNumber;
     IsCompleted         = false;
     PurchaseOrderNumber = evt.PurchaseOrderNumber;
     Description         = evt.Description;
     if (evt.Price.HasValue)
     {
         Price = new PositiveMoney(evt.Price.Value, evt.Currency);
     }
     else
     {
         evt.Price = null;
     }
 }
 public void ApplyEvent([AggregateId(nameof(FixedPriceJobOrderExtendedEvent.JobOrderId))] FixedPriceJobOrderExtendedEvent evt)
 {
     this.DueDate = evt.NewDueDate;
     this.Price   = new PositiveMoney(evt.Price, this.Price.Currency);
 }
Beispiel #7
0
 public void Apply(FixedPriceJobOrderExtendedEvent evt)
 {
     this.DueDate = evt.NewDueDate;
     this.Price = new PositiveMoney(evt.Price, this.Price.Currency);
 }
Beispiel #8
0
 public void Apply(FixedPriceJobOrderExtendedEvent evt)
 {
     this.DueDate = evt.NewDueDate;
     this.Price   = new PositiveMoney(evt.Price, this.Price.Currency);
 }