public function executeGetListEmployee() { if ($this->hasRequestParameter('name') && $this->getRequestParameter('name') != '') { $name = $this->getRequestParameter('name'); $c = new Criteria(); $cton1 = $c->getNewCriterion(EmployeePeer::NAME, "%{$name}%", Criteria::LIKE); $cton2 = $c->getNewCriterion(EmployeePeer::EMP_NO, "%{$name}%", Criteria::LIKE); $cton1->addOr($cton2); $c->add($cton1); $this->rows = EmployeePeer::doSelectFiltered($c); } }
public function executeGetCoordinatorList() { if ($this->hasRequestParameter('employee_name') && $this->getRequestParameter('employee_name') != '') { $c = new Criteria(); $cton1 = $c->getNewCriterion(EmployeePeer::NAME, '%' . $this->getRequestParameter('employee_name') . '%', Criteria::LIKE); $cton2 = $c->getNewCriterion(EmployeePeer::EMP_NO, '%' . $this->getRequestParameter('employee_name') . '%', Criteria::LIKE); $cton1->addOr($cton2); $c->add($cton1); #$c->add(EmployeePeer::IS_THESIS_ADVISOR, 0, Criteria::NOT_EQUAL); #$c->add(TestApplicantPeer::ISPASS1, '0'); #$this->rows = EmployeePeer::doSelectThesisAdvisor($c); $this->rows = EmployeePeer::doSelectFiltered($c); } }