예제 #1
0
 private function PopulateParticipants(ExistingReservationSeries $series)
 {
     $getSeriesParticipants = new GetReservationSeriesParticipantsCommand($series->SeriesId());
     $reader = ServiceLocator::GetDatabase()->Query($getSeriesParticipants);
     while ($row = $reader->GetRow()) {
         if ($row[ColumnNames::RESERVATION_USER_LEVEL] == ReservationUserLevel::PARTICIPANT) {
             $series->GetInstance($row[ColumnNames::REFERENCE_NUMBER])->WithParticipant($row[ColumnNames::USER_ID]);
         }
         if ($row[ColumnNames::RESERVATION_USER_LEVEL] == ReservationUserLevel::INVITEE) {
             $series->GetInstance($row[ColumnNames::REFERENCE_NUMBER])->WithInvitee($row[ColumnNames::USER_ID]);
         }
     }
     $reader->Free();
 }