private void Handle(MaintenanceJobPlanned e) { MaintenanceJob job = new MaintenanceJob(); Customer customer = new Customer(e.CustomerInfo.Id, e.CustomerInfo.Name, e.CustomerInfo.TelephoneNumber); Vehicle vehicle = new Vehicle(e.VehicleInfo.LicenseNumber, e.VehicleInfo.Brand, e.VehicleInfo.Type, customer.Id); job.Plan(e.JobId, e.StartTime, e.EndTime, vehicle, customer, e.Description); Jobs.Add(job); }
private IEnumerable <Event> Handle(MaintenanceJobPlanned e) { MaintenanceJob job = new MaintenanceJob(); Customer customer = new Customer(e.CustomerInfo.Id, e.CustomerInfo.Nombre, e.CustomerInfo.Telefono); Vehicle vehicle = new Vehicle(e.VehicleInfo.Matricula, e.VehicleInfo.Marca, e.VehicleInfo.Modelo, customer.CustomerId); job.Plan(e.JobId, e.StartTime, e.EndTime, vehicle, customer, e.Description); Jobs.Add(job); return(new Event[] { e }); }
private IEnumerable <Event> Handle(MaintenanceJobPlanned e) { MaintenanceJob job = new MaintenanceJob(); Customer customer = new Customer(e.CustomerInfo.Id, e.CustomerInfo.Name, e.CustomerInfo.TelephoneNumber); Vehicle vehicle = new Vehicle(e.VehicleInfo.LicenseNumber, e.VehicleInfo.Brand, e.VehicleInfo.Type, customer.CustomerId); job.Plan(e.JobId, e.StartTime, e.EndTime, vehicle, customer, e.Description); Jobs.Add(job); return(new List <Event>(new Event[] { e })); }