Esempio n. 1
0
 public function executeRun()
 {
     $this->applicant = $this->applicant;
     $this->error = false;
     $this->regTestPeriod = RegTestPeriodPeer::retrieveByPK($this->applicant->getRegTestPeriod1());
     if (!$this->regTestPeriod) {
         $this->success = true;
         $this->messageError = 'RegTestPeriod not found';
         return false;
     }
     $cd = new Criteria();
     $cd->add(TestSchedulePeer::REG_TEST_PERIOD_ID, $this->regTestPeriod->getId());
     $cd->addJoin(TestSchedulePeer::ID, TestApplSchedPeer::TEST_SCHEDULE_ID);
     $cd->add(TestApplSchedPeer::TEST_APPLICANT_ID, $this->applicant->getId());
     $this->testAppl = TestApplSchedPeer::doSelectOne($cd);
     if (!$this->testAppl) {
         $this->success = true;
         $this->messageError = 'Test Applicant Schedule not found';
         return false;
     }
     $cd = new Criteria();
     $cd->add(RegSchedulePeer::REG_PERIOD_ID, $this->regTestPeriod->getRegPeriodId(), Criteria::EQUAL);
     $cd->addAscendingOrderByColumn(RegSchedulePeer::START);
     $this->regSchedules = RegSchedulePeer::doSelect($cd);
 }
Esempio n. 2
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(RegSchedulePeer::ID, $pks, Criteria::IN);
         $objs = RegSchedulePeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Esempio n. 3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = RegSchedulePeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCode($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setRegPeriodId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setStart($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setEnd($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setName($arr[$keys[5]]);
     }
     if (array_key_exists($keys[6], $arr)) {
         $this->setDetail($arr[$keys[6]]);
     }
 }
Esempio n. 4
0
                                                                        <ul style="display: block; margin: 0; padding: 3px 0.7em; text-decoration: none; margin-left: 10px;">
                                                                                <li>
                                                                                        <span style="color:darkgoldenrod;"><?php 
    echo $reg_test_period->getRegPeriod() ? DateToIndo($reg_test_period->getRegPeriod()->getStart()) : '-';
    ?>
&nbsp;s.d&nbsp;<?php 
    echo $reg_test_period->getRegPeriod() ? DateToIndo($reg_test_period->getRegPeriod()->getEnd()) : '-';
    ?>
</span><br />
                                                                                        Periode Pendaftaran 
                                                                                </li>
                                                                                <?php 
    $cm = new Criteria();
    $cm->add(RegSchedulePeer::REG_PERIOD_ID, $reg_test_period->getRegPeriodId());
    $cm->addAscendingOrderByColumn(RegSchedulePeer::START);
    $reg_schedules = RegSchedulePeer::doSelect($cm);
    foreach ($reg_schedules as $reg_schedule) {
        ?>
                                                                                                            <li style="padding-top: 3px;">
                                                                                                                    <span style="color:darkgoldenrod;">
                                                                                                                    <?php 
        echo $reg_schedule->getStart() ? DateToIndo($reg_schedule->getStart()) : '-';
        ?>
&nbsp;s.d&nbsp;<?php 
        echo $reg_schedule->getStart() ? DateToIndo($reg_schedule->getEnd()) : '-';
        ?>
                                                                                                                    </span><br />
                                                                                                                    <?php 
        echo $reg_schedule->getName() ? $reg_schedule->getName() : '-';
        ?>
                                                                                                            </li>