示例#1
0
        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);
        }
示例#2
0
        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 });
        }
示例#3
0
        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 }));
        }