Exemplo n.º 1
0
 /**
  * @param TblProspectReservation $tblProspectReservation
  * @param string                 $ReservationYear
  * @param string                 $ReservationDivision
  * @param null|TblCompany        $tblCompanyOptionA
  * @param null|TblCompany        $tblCompanyOptionB
  *
  * @return TblProspectReservation
  */
 public function updateProspectReservation(TblProspectReservation $tblProspectReservation, $ReservationYear, $ReservationDivision, TblCompany $tblCompanyOptionA = null, TblCompany $tblCompanyOptionB = null)
 {
     $Manager = $this->Connection->getEntityManager();
     /** @var null|TblProspectReservation $Entity */
     $Entity = $Manager->getEntityById('TblProspectReservation', $tblProspectReservation->getId());
     if (null !== $Entity) {
         $Protocol = clone $Entity;
         $Entity->setReservationYear($ReservationYear);
         $Entity->setReservationDivision($ReservationDivision);
         $Entity->setServiceTblCompanyOptionA($tblCompanyOptionA);
         $Entity->setServiceTblCompanyOptionB($tblCompanyOptionB);
         $Manager->saveEntity($Entity);
         Protocol::useService()->createUpdateEntry($this->Connection->getDatabase(), $Protocol, $Entity);
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * @param null|TblProspectReservation $tblProspectReservation
  */
 public function setTblProspectReservation(TblProspectReservation $tblProspectReservation = null)
 {
     $this->tblProspectReservation = null === $tblProspectReservation ? null : $tblProspectReservation->getId();
 }