예제 #1
0
 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);
 }
예제 #2
0
        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;
        }