• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP DaoFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: perform

 /**
  * PL/SQLのbatch_zaiko_allを実行する
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     try {
         $this->alterDao = DaoFactory::AlterSql();
         $this->alterDao->BeginTransaction();
         $app_name = $this->config->get('app_name');
         // 更新所有项目
         $this->AlterDB_21275();
         $this->ModifyData_21275();
         if ($app_name == 'AsOrder') {
             //AsOrderのみ
         } elseif ($app_name == 'AsCount') {
             //AsCountのみ
         } elseif ($app_name == 'AsZai') {
             //AsZaiのみ
         }
         $params = array('CURRENT_VERSION' => $this->config->get('code_version'), 'UID' => 'script', 'PGM' => 'batch');
         DaoFactory::SystemInfo()->Update($params);
         $this->alterDao->CommitTransaction();
     } catch (Exception $e) {
         $this->alterDao->AbortTransaction();
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:29,代码来源:U026000.php


示例2: validateParams

 function validateParams($params)
 {
     $error_message_list = array();
     // 現在のパスワード
     $UserMst = DaoFactory::UserMst();
     $userData = $UserMst->UserMst_GetByUserId($params);
     if ($params['current_pwd'] == '') {
         $error_message_list['current_pwd'] = '現在のパスワードが入力されていません。';
     } else {
         if ($userData['USER_PWD'] != $params['current_pwd_hash']) {
             $error_message_list['current_pwd'] = '現在のパスワードが正しくありません。';
         }
     }
     // 新しいパスワード
     if ($params['new_pwd1'] == '') {
         $error_message_list['new_pwd1'] = '新しいパスワードが入力されていません。';
     }
     // 新しいパスワード(確認用)
     if ($params['new_pwd2'] == '') {
         $error_message_list['new_pwd2'] = '新しいパスワード(確認用)が入力されていません。';
     }
     if ($params['new_pwd1'] != $params['new_pwd2']) {
         $error_message_list['new_pwd1'] = '二つの新しいパスワードの入力内容が異なっています。';
     }
     return $error_message_list;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:26,代码来源:Update.php


示例3: getFactory

 /**
  * Get a factory instance. 
  * @return DaoFactory
  */
 public static function getFactory()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
开发者ID:jescacena,项目名称:cispAPI,代码行数:11,代码来源:class.DaoFactory.inc.php


示例4: perform

 /**
  * 出庫一覧の保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     set_time_limit(DEFAULT_CSV_PROCESS_TIME_LIMIT);
     // 初期化
     $nyushutsu_date_from = $this->af->get('nyushutsu_date_from');
     $nyushutsu_date_to = $this->af->get('nyushutsu_date_to');
     $warehouse_id = $this->af->get('warehouse_id');
     $product_id = $this->af->get('product_id');
     $product_name = $this->af->get('product_name');
     $denpyo_no = $this->af->get('denpyo_no');
     $record_arr = $this->af->get('record_arr');
     $keyword = $this->af->get('keyword');
     $company_id = $this->session->get('company_id');
     if (!empty($record_arr)) {
         $params = array('company_id' => $company_id, 'record_arr' => $record_arr);
     } else {
         $params = array('company_id' => $company_id, 'nyushutsu_date_from' => $nyushutsu_date_from, 'nyushutsu_date_to' => $nyushutsu_date_to, 'product_id' => $product_id, 'product_name' => $product_name, 'warehouse_id' => $warehouse_id, 'denpyo_no' => $denpyo_no, 'keyword' => $keyword);
     }
     try {
         // 一覧を取得
         $sth = DaoFactory::NyushutsuD()->getStoragerecordCsvData($params);
         // 書き込みクラスを生成
         require_once 'csv/NyushutsuDCsvWriter.class.php';
         $writer = new NyushutsuDCsvWriter();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('csv', $writer, $sth, 'NyushutsuD' . date('YmdHis') . '.csv');
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:36,代码来源:Export.php


示例5: perform

 /**
  * AIカスタムマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // 初期化
     $ai = $this->af->get('ai');
     $ai_name = $this->af->get('ai_name');
     $company_id = $this->session->get('company_id');
     $data_length = $this->af->get('data_length');
     $gtin14 = $this->af->get('gtin14');
     $user_id = $this->session->get('user_id');
     try {
         // 保存
         $dao = DaoFactory::AicustomMst();
         $dao->BeginTransaction();
         // WAREHOUSE_MSTに保存
         $params = array('ai_name' => $ai_name, 'data_length' => $data_length, 'UID' => $user_id, 'PGM' => get_class());
         // AIカスタムコード存在チェック
         //             $exist = $dao->Retrieve(' ai = ? AND company_id = ?  ', array($ai, $company_id));
         //             if(!is_array($exist)){
         //                 $def1 = $this->af->getDef('ai');
         //                 $err_msg = array(
         //                     'ai' =>  $def1['name'] ."が登録されていません",
         //                 );
         //                 return array(400, $err_msg);
         //             }
         $dao->Update($params, 'ai = ? and gtin14 = ? and company_id = ? ', array($ai, $gtin14, $company_id));
         $dao->CommitTransaction();
     } catch (Exception $e) {
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     return array('json', array('status' => '200'));
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:38,代码来源:Update.php


示例6: perform

 /**
  * 区分マスタのデータをJSON形式で返す
  * @access public
  * @return array 区分マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $buyer_cd = $this->af->get('buyer_cd');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'buyer_cd' => $buyer_cd);
         // 詳細を取得
         $detail = DaoFactory::BuyerMst()->getBuyerByKeys($params);
         $detail['TERMINAL_ID'] = DaoFactory::BuyerMst()->GetAllTerminalsByBuyerCD($params);
         $detail['USER_ID'] = DaoFactory::BuyerMst()->GetAllUsersByBuyerCD($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);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:31,代码来源:Get.php


示例7: perform

 /**
  * バーコードパターンマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $arr_data = $this->af->get('arr_data');
     // get session params
     $company_id = $this->session->get('company_id');
     // dao
     $BarcodePatternMstDao = DaoFactory::BarcodePatternMst();
     file_put_contents('/tmp/aszai_arr_datasss', var_export($arr_data, true));
     try {
         // mod params
         // start transaction
         $BarcodePatternMstDao->BeginTransaction();
         foreach ($arr_data as $key => $value) {
             // set dao params
             $params = array('regex' => $value, 'UID' => $user_id, 'PGM' => get_class());
             // update
             $BarcodePatternMstDao->Update($params, ' company_id = ? and data_type = ? ', array($company_id, $key));
         }
         // commit transaction
         $BarcodePatternMstDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $BarcodePatternMstDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Update.php


示例8: perform

 /**
  * 担当マスタの削除処理
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $staff_id_arr = $this->af->get('staff_id_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     // dao
     $staffDao = DaoFactory::StaffMst();
     try {
         // begin
         $staffDao->BeginTransaction();
         $params = array('company_id' => $company_id);
         if ($_REQUEST['del'] == 'all') {
             $staffDao->Delete(' company_id = ? ', $params);
         } else {
             foreach ($staff_id_arr as $staff_id) {
                 $params['staff_id'] = $staff_id;
                 $staffDao->Delete(' company_id = ? AND staff_id = ? ', $params);
             }
         }
         $staffDao->CommitTransaction();
     } catch (Exception $e) {
         $staffDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:33,代码来源:Delete.php


示例9: perform

 /**
  * ロールマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $role_id_arr = $this->af->get('role_id_arr');
     // get session params
     $s_user_id = $this->session->get('user_id');
     $company_id = $this->session->get('company_id');
     // dao
     $roleDao = DaoFactory::RoleMst();
     $menuRoleDDao = DaoFactory::MenuRoleD();
     try {
         // begin
         $roleDao->BeginTransaction();
         $params = array('company_id' => $company_id);
         if ($_REQUEST['del'] == 'all') {
             $roleDao->Delete(' company_id = ? ', $params);
             $menuRoleDDao->Delete(' company_id = ? ', $params);
         } else {
             foreach ($role_id_arr as $role_id) {
                 $where = ' company_id = ? AND role_id = ? ';
                 $params['role_id'] = $role_id;
                 $roleDao->Delete($where, $params);
                 $menuRoleDDao->Delete($where, $params);
             }
         }
         // commit
         $roleDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $roleDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:40,代码来源:Delete.php


示例10: perform

 /**
  * 担当マスタのデータをJSON形式で返す
  * @access public
  * @return array 担当マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // 初期化
     $not_staff_id = $this->af->get('not_staff_id');
     $limit = $this->af->get('limit');
     // default 50
     $page = $this->af->get('page');
     // default 1
     $order = $this->af->get('order');
     // default asc
     $column = $this->af->get('column');
     // default warehouse_id
     $keyword = $this->af->get('keyword');
     $company_id = $this->session->get('company_id');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $loginData = unserialize($this->session->get('loginData'));
     try {
         // DAO パラメータ定義
         $params = array('not_staff_id' => $not_staff_id, 'limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
         // 一覧を取得
         $list = DaoFactory::StaffMst()->StaffMst_GetStaffListCdAndName($params)->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


示例11: perform

 /**
  * 店舗マスタのデータをJSON形式で返す
  * @access public
  * @return array 店舗マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $warehouse_id = $this->af->get('warehouse_id');
     // get session params
     $company_id = $this->session->get('company_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'warehouse_id' => $warehouse_id);
         // 詳細を取得
         $detail = DaoFactory::WarehouseMst()->Retrieve(' company_id = ? AND warehouse_id = ? ', $params);
         unset($detail['COMPANY_ID']);
         // パスワードは出力させない
         if ('' != $detail['STOCK_MOVE_RCV_WAYS']) {
             $arr = explode(',', $detail['STOCK_MOVE_RCV_WAYS']);
         } else {
             $arr = array();
         }
         foreach ($arr as $value) {
             $detail['STOCK_MOVE_RCV_WAYS[' . $value . ']'] = 1;
         }
         // 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,代码行数:37,代码来源:Get.php


示例12: perform

 /**
  * ユーザマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id_arr = $this->af->get('user_id_arr');
     // get session params
     $s_user_id = $this->session->get('user_id');
     $company_id = $this->session->get('company_id');
     // dao
     $userDao = DaoFactory::UserMst();
     try {
         // begin
         $userDao->BeginTransaction();
         if ($_REQUEST['del'] == 'all') {
             $userDao->Delete(' company_id = ? AND user_id <> ? ', array($company_id, $s_user_id));
         } else {
             foreach ($user_id_arr as $user_id) {
                 $userDao->Delete('company_id = ? AND user_id = ? ', array($company_id, $user_id));
             }
         }
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Delete.php


示例13: perform

 function perform()
 {
     //パラメータ取得
     $company_id = $this->af->get('company_id');
     $warehouse_id = $this->af->get('warehouse_id');
     $product_id = $this->af->get('product_id');
     $keyword = $this->af->get('keyword');
     $bc_1 = $this->af->get('bc_1');
     $ai = $this->af->get('ai');
     $ai_arr = array();
     if (!empty($ai)) {
         foreach ($ai as $key => $value) {
             $ai_arr[] = '%(' . str_replace('y', '_', $key) . ')' . $value . '%';
         }
     }
     try {
         $dao = DaoFactory::ZaikoD();
         $params = array('company_id' => $company_id, 'warehouse_id' => $warehouse_id, 'product_id' => $product_id, 'barcode' => $bc_1, 'keyword' => $keyword, 'ai_arr' => $ai_arr);
         $output = $dao->searchZaikoListForApi($params);
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:26,代码来源:List.php


示例14: perform

 /**
  * 担当編集のビュー名を返す
  * @access public
  * @return string ビュー名
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     $staff_id = $this->af->get('staff_id');
     $staff = DaoFactory::StaffMst()->Retrieve('staff_id = ?', array($staff_id));
     $this->af->set('staff_name', $staff['STAFF_NAME']);
     return 'master_staff_detail_edit';
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:13,代码来源:Edit.php


示例15: perform

 function perform()
 {
     //パラメータ取得
     $order_id = $this->af->get('order_id');
     $service_list = json_decode($this->af->get('service_list'), true);
     $user_id = $this->session->get('user_id');
     $params = array('order_id' => $order_id, 'service_list' => $service_list, 'pgm' => get_class(), 'uid' => $user_id);
     try {
         $dao = DaoFactory::LicenseMst();
         $exist = $dao->Retrieve(' ORDER_ID = ? ', array($order_id));
         if (!empty($exist)) {
             echo 0;
             exit;
         }
         $dao->BeginTransaction();
         $dao->insertNewLicense($params);
         //commit
         $dao->CommitTransaction();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     echo 0;
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:27,代码来源:Entry.php


示例16: perform

 /**
  * 店舗マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // 初期化
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $warehouse_id = $this->af->get('warehouse_id');
     $warehouse_name = $this->af->get('warehouse_name');
     $stock_move_rcv_ways = $this->af->get('stock_move_rcv_ways');
     // 保存
     $warehouse = DaoFactory::WarehouseMst();
     try {
         $warehouse->BeginTransaction();
         // WAREHOUSE_MSTに保存
         $params = array('warehouse_name' => $warehouse_name, 'stock_move_rcv_ways' => implode(',', array_keys($stock_move_rcv_ways)), 'UID' => $user_id, 'PGM' => get_class());
         // 店舗コード存在チェック
         $exist = $warehouse->Retrieve(' company_id = ? AND warehouse_id = ?  ', array($company_id, $warehouse_id));
         if (!is_array($exist)) {
             $def1 = $this->af->getDef('warehouse_id');
             $err_msg = array('warehouse_id' => $def1['name'] . "が登録されていません");
             return array(400, $err_msg);
         }
         $warehouse->Update($params, 'company_id=? AND warehouse_id=?', array($company_id, $warehouse_id));
         $warehouse->CommitTransaction();
     } catch (Exception $e) {
         $warehouse->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:35,代码来源:Update.php


示例17: perform

 /**
  * 端末マスタのデータをJSON形式で返す
  * @access public
  * @return array 端末マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $s_terminal_id = $this->af->get('terminal_id');
     // get session params
     $company_id = $this->session->get('company_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'terminal_id' => $s_terminal_id);
         // 詳細を取得
         $detail = DaoFactory::TerminalMst()->Retrieve(' company_id = ? AND terminal_id = ? ', $params);
         $licenses = DaoFactory::TanmatsuLicense()->GetLicenseInfo($params)->fetchAll();
         unset($detail['PASSWORD']);
         unset($detail['PASSWORD_KIGEN']);
         $detail['LICENSE_ID'] = array();
         foreach ($licenses as $record) {
             $detail['LICENSE_ID'][] = array('LICENSE_ID' => $record['LICENSE_ID'], 'START_YMD' => $record['START_YMD'], 'END_YMD' => $record['END_YMD']);
         }
         // 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,代码行数:34,代码来源:Get.php


示例18: authenticate

 function authenticate()
 {
     $this->af->setApp('app_name', $this->config->get('app_name'));
     // ログインチェック
     $login = new LoginController();
     if (!$login->isLogin()) {
         return 'login';
     }
     // パスワード期限チェック
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $params = array('company_id' => $company_id, 'user_id' => $user_id);
     if (DaoFactory::UserMst()->isExpiredPassword($params)) {
         return 'password_list';
     }
     // get params
     $kengen_flg = intval($this->session->get('kengen_flg'));
     // 権限取得
     // 権限フラグチェック
     if ($kengen_flg != Konst::KENGEN_FLG_KANRI && $kengen_flg != Konst::KENGEN_FLG_SUPER) {
         // 管理者ユーザ(8)、スーパーユーザ(9)以外であれば弾く
         $login->Logout();
         return 'login';
     }
     $locale = $this->session->get('current_locale');
     if ($locale) {
         $this->backend->getController()->setLocale($locale);
     }
     $this->setGuideModal();
     $this->checkLicense();
     return null;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:32,代码来源:ActionClass.php


示例19: perform

 /**
  * 店舗マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // 初期化
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $shiiresaki_cd = $this->af->get('shiiresaki_cd');
     $shiiresaki_mei = $this->af->get('shiiresaki_mei');
     $shiiresaki_mei_kana = $this->af->get('shiiresaki_mei_kana');
     $shiiresaki_kbn = $this->af->get('shiiresaki_kbn');
     // 保存
     $shiiresaki = DaoFactory::ShiiresakiMst();
     try {
         $shiiresaki->BeginTransaction();
         // WAREHOUSE_MSTに保存
         $params = array('company_id' => $company_id, 'shiiresaki_cd' => $shiiresaki_cd, 'shiiresaki_mei' => $shiiresaki_mei, 'shiiresaki_mei_kana' => $shiiresaki_mei_kana, 'shiiresaki_kbn' => $shiiresaki_kbn, 'UID' => $user_id, 'PGM' => get_class());
         // 店舗コード重複チェック
         $exist = $shiiresaki->Retrieve(' company_id = ? and shiiresaki_cd = ?  ', array($company_id, $shiiresaki_cd));
         if (!empty($exist)) {
             $def1 = $this->af->getDef('shiiresaki_cd');
             $err_msg = array('shiiresaki_cd' => "入力された" . $def1['name'] . "は既に登録されています");
             return array(400, $err_msg);
         }
         $shiiresaki->Insert($params);
         $shiiresaki->CommitTransaction();
     } catch (Exception $e) {
         $shiiresaki->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:36,代码来源:Insert.php


示例20: perform

 /**
  * 店舗マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $staff_id = $this->af->get('staff_id');
     $staff_name = $this->af->get('staff_name');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     try {
         $dao = DaoFactory::StaffMst();
         $dao->BeginTransaction();
         $staff = $dao->Retrieve('company_id = ? AND staff_id = ?', array($company_id, $staff_id));
         if (empty($staff)) {
             $params = array('company_id' => $company_id, 'staff_id' => $staff_id, 'staff_name' => $staff_name, 'UID' => $user_id, 'PGM' => get_class());
             $dao->Insert($params);
         } else {
             $params = array('staff_name' => $staff_name, 'UID' => $user_id, 'PGM' => get_class());
             $dao->Update($params, 'company_id = ? AND staff_id = ?', array($company_id, $staff_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,代码来源:Update.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Dashboard类代码示例发布时间:2022-05-23
下一篇:
PHP Dao类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap