예제 #1
0
 /**
  * @param null|TblCommonBirthDates $tblCommonBirthDates
  */
 public function setTblCommonBirthDates(TblCommonBirthDates $tblCommonBirthDates = null)
 {
     $this->tblCommonBirthDates = null === $tblCommonBirthDates ? null : $tblCommonBirthDates->getId();
 }
예제 #2
0
 /**
  * @param TblCommonBirthDates $tblCommonBirthDates
  * @param string              $Birthday
  * @param string              $Birthplace
  * @param int                 $Gender
  *
  * @return TblCommonBirthDates
  */
 public function updateCommonBirthDates(TblCommonBirthDates $tblCommonBirthDates, $Birthday, $Birthplace, $Gender)
 {
     $Manager = $this->Connection->getEntityManager();
     /** @var null|TblCommonBirthDates $Entity */
     $Entity = $Manager->getEntityById('TblCommonBirthDates', $tblCommonBirthDates->getId());
     if (null !== $Entity) {
         $Protocol = clone $Entity;
         $Entity->setBirthday($Birthday ? new \DateTime($Birthday) : null);
         $Entity->setBirthplace($Birthplace);
         $Entity->setGender($Gender);
         $Manager->saveEntity($Entity);
         Protocol::useService()->createUpdateEntry($this->Connection->getDatabase(), $Protocol, $Entity);
         return true;
     }
     return false;
 }