Esempio n. 1
0
 /**
  * リクエストの担当CDがDBに登録されているかチェックする
  * @param string $name フォーム名
  */
 public function check_staff_id_exists($name)
 {
     // 商品を取得
     $params = array('company_id' => $this->backend->getSession()->get('company_id'), 'staff_id' => $this->form_vars['staff_id']);
     $staff = DaoFactory::StaffMST()->Retrieve(' company_id = ? AND staff_id = ? ', $params);
     // 商品が存在しない場合
     if (empty($staff)) {
         $this->ae->add($name, "入力された{form}は登録されていません", E_FORM_INVALIDCHAR);
     }
 }
Esempio n. 2
0
 /**
  * 担当マスタのデータをJSON形式で返す
  * @access public
  * @return array 担当マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $staff_id = $this->af->get('staff_id');
     // get session params
     $company_id = $this->session->get('company_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'staff_id' => $staff_id);
         // 詳細を取得
         $detail = DaoFactory::StaffMST()->Retrieve(' company_id = ? AND staff_id = ? ', $params);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $detail;
         $output['pagerData'] = array();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
Esempio n. 3
0
 /**
  * 担当マスタのデータをJSON形式で返す
  * @access public
  * @return array 担当マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // 初期化
     $keyword = $this->af->get('staff_keyword');
     $company_id = $this->session->get('company_id');
     try {
         $params = array('keyword' => $keyword, 'company_id' => $company_id);
         // 一覧を取得
         $list = DaoFactory::StaffMST()->StaffMst_GetStaffListCdAndName($params)->fetchAll();
         // ページ情報を設定
         $pager = array('result_page' => '', 'result_start_num' => '', 'result_end_num' => '', 'result_all_count' => count($list) ? $list[0]['FOUND_ROWS'] : 0, 'result_get_count' => count($list), 'result_limit' => '');
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pager;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }