public ScenarioExportImportViewModel(IScenario s) { id = s.id; duration = s.duration; bookingCountPerDay = s.bookingCountPerDay; vehicles = s.vehicles; foreach (Rushhour r in s.rushhours) { rushhours.Add(new RushhourExportImportViewModel(r)); } start = s.start; location = new LocationExportImportViewModel(s.location); }
public BookingExportImportViewModel(IBooking b) { id = b.id; capacity = b.capacity; plugs = b.plugs; socStart = b.socStart; socEnd = b.socEnd; user = b.user; startTime = b.startTime; endTime = b.endTime; station = b.station; active = b.active; if (b.location != null) { location = new LocationExportImportViewModel(b.location); } priority = b.priority; }