本文整理汇总了PHP中DaoFactory::BarcodePatternMst方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::BarcodePatternMst方法的具体用法?PHP DaoFactory::BarcodePatternMst怎么用?PHP DaoFactory::BarcodePatternMst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DaoFactory
的用法示例。
在下文中一共展示了DaoFactory::BarcodePatternMst方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: perform
/**
* バーコードパターン編集のビュー名を返す
* @access public
* @return string ビュー名
* @see Admin_ActionClass::perform()
*/
function perform()
{
$company_id = $this->session->get('company_id');
$params = array('company_id' => $company_id);
$data_type = DaoFactory::BarcodePatternMst()->Select(' company_id = ? ', $params)->fetchAll();
$this->af->setApp('data_type', $data_type);
return 'master_barcodepattern_detail_edit';
}