当前位置: 首页>>代码示例>>PHP>>正文


PHP DaoFactory::KbnCategoryMst方法代码示例

本文整理汇总了PHP中DaoFactory::KbnCategoryMst方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::KbnCategoryMst方法的具体用法?PHP DaoFactory::KbnCategoryMst怎么用?PHP DaoFactory::KbnCategoryMst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::KbnCategoryMst方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: perform

 /**
  * カテゴリマスタのデータをJSON形式で返す
  * @access public
  * @return array カテゴリマスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $category_id = $this->af->get('category_id');
     $kbn_category_name = $this->af->get('kbn_category_name');
     $must_flg = $this->af->get('must_flg');
     $keyword = $this->af->get('keyword');
     // get request params ( pager )
     $limit = $this->af->get('limit');
     $page = $this->af->get('page');
     $order = $this->af->get('order');
     $column = $this->af->get('column');
     // get session params
     $company_id = $this->session->get('company_id');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     try {
         // DAO パラメータ定義
         $params = array('category_id' => $category_id, 'kbn_category_name' => $kbn_category_name, 'must_flg' => $must_flg, 'keyword' => $keyword, 'order' => $order, 'column' => $column, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
         // 一覧を取得
         $stmt = DaoFactory::KbnCategoryMst()->KbnCategoryMst_GetList($params);
         $list = $stmt->fetchAll();
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => $start_page, 'result_end_num' => $end_page, 'result_all_count' => count($list) ? $list[0]['FOUND_ROWS'] : 0, 'result_get_count' => count($list), 'result_limit' => $limit);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pager;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:41,代码来源:Get.php

示例2: perform

 /**
  * 端末マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $category_id_arr = $this->af->get('category_id_arr');
     $status_flg = $this->af->get('status_flg');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     // dao
     $Dao = DaoFactory::KbnCategoryMst();
     try {
         // begin
         $Dao->BeginTransaction();
         foreach ($category_id_arr as $category_id) {
             // set params
             $params = array('IS_MUST' => $status_flg, 'UID' => $s_user_id, 'PGM' => get_class());
             // dao update
             $Dao->Update($params, ' COMPANY_ID = ? AND CATEGORY_ID = ? ', array($company_id, $category_id));
         }
         // commit
         $Dao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $Dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Setmust.php

示例3: getCategoryList

 public function getCategoryList()
 {
     $company_id = $this->backend->getSession()->get('company_id');
     $dao = DaoFactory::KbnCategoryMst();
     $list = $dao->getCategoryListForSelectBox(array('company_id' => $company_id));
     $option = array('' => '');
     foreach ($list as $row) {
         $option[$row['CATEGORY_ID']] = $row['CATEGORY_ID'] . ':' . $row['KBN_CATEGORY_NAME'];
     }
     return $option;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:11,代码来源:Search.php


注:本文中的DaoFactory::KbnCategoryMst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。