protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['flightId = ?'] = $this->_getParam('flightId');
     $ret['mainCrew = ?'] = TRUE;
     return $ret;
 }
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     if ($this->_getParam('trainingId') != NULL) {
         $ret['trainingId = ?'] = $this->_getParam('trainingId');
     }
     return $ret;
 }
Example #3
0
 protected function _getWhere()
 {
     $users = Kwf_Registry::get('userModel');
     $ret = parent::_getWhere();
     $ret['status = ?'] = 0;
     $ret['userId = ?'] = $users->getAuthedUserId();
     return $ret;
 }
Example #4
0
 protected function _getWhere()
 {
     $users = Kwf_Registry::get('userModel');
     $employeesModel = Kwf_Model_Abstract::getInstance('Employees');
     $employeesSelect = $employeesModel->select()->whereEquals('userId', $users->getAuthedUserId());
     $employee = $employeesModel->getRow($employeesSelect);
     $ret = parent::_getWhere();
     $employeeId = -1;
     if ($employee != NULL) {
         $employeeId = $employee->id;
     }
     $ret['employeeId = ?'] = $employeeId;
     return $ret;
 }
 protected function _getWhere()
 {
     $users = Kwf_Registry::get('userModel');
     $employeesModel = Kwf_Model_Abstract::getInstance('Employees');
     $employeesSelect = $employeesModel->select()->whereEquals('userId', $users->getAuthedUserId());
     $employee = $employeesModel->getRow($employeesSelect);
     $resultsModel = Kwf_Model_Abstract::getInstance('TrainingResults');
     if ($employee != NULL) {
         $resultsSelect = $resultsModel->select()->where(new Kwf_Model_Select_Expr_Sql("employeeId = " . $employee->id . " AND currentScore = 0 AND trainingGroupId = " . $this->_getParam('groupId')));
         $result = $resultsModel->getRow($resultsSelect);
     }
     $ret = parent::_getWhere();
     if ($result != NULL) {
         $ret['resultId = ?'] = $result->id;
     }
     return $ret;
 }
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['planId = ?'] = $this->_getParam('planId');
     return $ret;
 }
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['trainingGroupId = ?'] = $this->_getParam('groupId');
     return $ret;
 }
Example #8
0
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['groupType = ?'] = 2;
     return $ret;
 }
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['checkDate = ?'] = date('Y-m-d');
     return $ret;
 }
Example #10
0
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['contentQuestionId = ?'] = $this->_getParam('questionId');
     return $ret;
 }
 protected function _getWhere()
 {
     $ret = parent::_getWhere();
     $ret['member_id = ?'] = $this->_getParam('member_id');
     return $ret;
 }
 protected function _getWhere()
 {
     $where = parent::_getWhere();
     $where['customer_id = ?'] = $this->_getParam('customer_id');
     return $where;
 }