Example #1
0
 public AddModel(VehicleStore vehicleStore, CustomerStore customerStore, InsuranceStore insuranceStore,
                 InsurancesRules insurancesRules)
 {
     VehicleStore    = vehicleStore;
     CustomerStore   = customerStore;
     InsuranceStore  = insuranceStore;
     InsurancesRules = insurancesRules;
 }
Example #2
0
 public void OnGet(Guid vehicleid)
 {
     Vehicle    = VehicleStore.GetVehiclesById(vehicleid);
     Customer   = CustomerStore.GetCustomerById(Vehicle.CustomerId);
     idCustomer = Customer.Id;
     idVehicle  = Vehicle.Id;
     City       = Customer.City;
     Insurance  = InsurancesRules.GetPrice(idCustomer, idVehicle);
     Age        = DateTime.Today.AddTicks(-Customer.BornDate.Ticks).Year - 1;
 }