Beispiel #1
0
 public function executeSave()
 {
     $params = array();
     foreach (explode('&', $this->getRequestParameter('student_list_ser')) as $p) {
         $p = explode('=', $p);
         $params[rawurldecode($p[0])][] = rawurldecode($p[1]);
     }
     if (array_key_exists('students', $params)) {
         foreach ($params['students'] as $stu_id) {
             $student_type = new StudentType();
             $student_type->setPayerTypeId($this->getRequestParameter('payer_type_id'));
             $student_type->setStudentId($stu_id);
             $student_type->setStatus(1);
             $student_type->save();
         }
     }
     return $this->redirect('student_type/list');
 }
Beispiel #2
0
 public function executeSave4()
 {
     $student = StudentPeer::retrieveByPk($this->getRequestParameter('student_id'));
     $this->forward404Unless($student);
     $student_type = new StudentType();
     $student_type->setPayerTypeId($this->getRequestParameter('payer_type_id'));
     $student_type->setStudent($student);
     $student_type->setStatus(1);
     $student_type->save();
     $filter_class = $this->getRequestParameter('filter_class');
     $filter_name = $this->getRequestParameter('filter_name');
     $filter_code = $this->getRequestParameter('filter_code');
     $filter_payer = $this->getRequestParameter('filter_payer');
     return $this->redirect('student_payment/listElse?student_id=' . $student->getId());
 }