當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DaoFactory::KbnMst方法代碼示例

本文整理匯總了PHP中DaoFactory::KbnMst方法的典型用法代碼示例。如果您正苦於以下問題:PHP DaoFactory::KbnMst方法的具體用法?PHP DaoFactory::KbnMst怎麽用?PHP DaoFactory::KbnMst使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::KbnMst方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: perform

 /**
  * 區分マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $category_id = $this->af->get('category_id');
     $kbn_id = $this->af->get('kbn_id');
     $kbn_name = $this->af->get('kbn_name');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     // dao
     $kbnDao = DaoFactory::KbnMst();
     try {
         // begin
         $kbnDao->BeginTransaction();
         // cd exists
         $params = array('company_id' => $company_id, 'category_id' => $category_id, 'kbn_id' => $kbn_id, 'kbn_name' => $kbn_name, 'UID' => $user_id, 'PGM' => get_class());
         $kbnDao->Insert($params);
         // commit
         $kbnDao->CommitTransaction();
     } catch (Exception $e) {
         $kbnDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:31,代碼來源:Insert.php

示例2: perform

 /**
  * 區分マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $record_arr = $this->af->get('record_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     // dao
     $KbnDao = DaoFactory::KbnMst();
     try {
         // begin
         $params = array('company_id' => $company_id);
         $KbnDao->BeginTransaction();
         if ($_REQUEST['del'] == 'all') {
             $KbnDao->Delete(' company_id = ? ', $params);
         } else {
             foreach ($record_arr as $key => $pk) {
                 $params['category_id'] = $pk['category_id'];
                 $params['kbn_id'] = $pk['kbn_id'];
                 $KbnDao->Delete(' company_id = ? AND category_id = ? AND kbn_id = ? ', $params);
             }
         }
         $KbnDao->CommitTransaction();
     } catch (Exception $e) {
         $KbnDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:34,代碼來源:Delete.php

示例3: perform

 /**
  * 區分マスタCSVを出力
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     set_time_limit(DEFAULT_CSV_PROCESS_TIME_LIMIT);
     // get request params
     $category_id = $this->af->get('category_id');
     $category_name = $this->af->get('category_name');
     $kbn_id = $this->af->get('kbn_id');
     $kbn_name = $this->af->get('kbn_name');
     $keyword = $this->af->get('keyword');
     $record_arr = $this->af->get('record_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     // pager setting
     $order = $this->af->get('order');
     // default asc
     $column = $this->af->get('column');
     // default warehouse_id
     try {
         // 一覧を取得
         if (!empty($record_arr)) {
             $params = array('company_id' => $company_id, 'record_arr' => $record_arr, 'csv' => true);
         } else {
             $params = array('company_id' => $company_id, 'kbn_id' => $kbn_id, 'kbn_name' => $kbn_name, 'keyword' => $keyword, 'order' => $order, 'column' => $column, 'csv' => true);
         }
         $dao = DaoFactory::KbnMst();
         $sth = $dao->getKbnList($params);
         // 書き込みクラスを生成
         require_once 'csv/KbnMstCsvWriter.class.php';
         $writer = new KbnMstCsvWriter();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('csv', $writer, $sth, 'KbnMst' . date('YmdHis') . '.csv');
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:40,代碼來源:Export.php

示例4: check_kbn_not_exists

 public function check_kbn_not_exists($name)
 {
     $bind = array('company_id' => $this->backend->getSession()->get('company_id'), 'category_id' => $this->form_vars['category_id'], 'kbn_id' => $this->form_vars['kbn_id']);
     // 區分を取得
     $dao = DaoFactory::KbnMst();
     $result = $dao->Retrieve(' COMPANY_ID = ? AND CATEGORY_ID = ? AND KBN_ID = ? ', $bind);
     if (!empty($result)) {
         $this->ae->add($name, "入力された{form}は既に登録されています", E_FORM_INVALIDCHAR);
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:10,代碼來源:Control.php

示例5: perform

 /**
  * 區分マスタのデータをJSON形式で返す
  * @access public
  * @return array 區分マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $kbn_id = $this->af->get('kbn_id');
     $category_id = $this->af->get('category_id');
     // get session params
     $company_id = $this->session->get('company_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'kbn_id' => $kbn_id, 'category_id' => $category_id);
         // 詳細を取得
         $detail = DaoFactory::KbnMst()->getKbnForEdit($params);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $detail;
         $output['pagerData'] = array();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:28,代碼來源:Get.php


注:本文中的DaoFactory::KbnMst方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。