Example #1
0
 public Period getPeriod(int bsID, DateTime time)
 {
     PeriodCtr pCtr = new PeriodCtr();
     MPeriod period = pCtr.getRecord(bsID, time, true);
     Period p = new Period();
     if (period != null)
     {
         p.bsID = bsID;
         p.availNumber = period.initBatteryNumber;
         p.bookedNumber = period.bookedBatteryNumber;
         p.time = period.time;
     }
     return p;
 }
Example #2
0
 public List<Period> getStoragePeriods(int bsID)
 {
     PeriodCtr pCtr = new PeriodCtr();
     List<MPeriod> periods = pCtr.getStoragePeriods(bsID);
     List<Period> ps = new List<Period>();
     foreach (MPeriod period in periods)
     {
         Period p = new Period();
         p.availNumber = period.initBatteryNumber;
         p.bookedNumber = period.bookedBatteryNumber;
         p.time = period.time;
         ps.Add(p);
     }
     return ps;
 }
Example #3
0
 public List<Period> getAllPeriods()
 {
     PeriodCtr pCtr = new PeriodCtr();
     List<MPeriod> periods = pCtr.getAllRecord(true);
     List<Period> ps = new List<Period>();
     foreach (MPeriod period in periods)
     {
         Period p = new Period();
         p.availNumber = period.initBatteryNumber;
         p.bookedNumber = period.bookedBatteryNumber;
         p.time = period.time;
         ps.Add(p);
     }
     return ps;
 }