本文整理汇总了PHP中DaoFactory::ShiiresakiMst方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::ShiiresakiMst方法的具体用法?PHP DaoFactory::ShiiresakiMst怎么用?PHP DaoFactory::ShiiresakiMst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DaoFactory
的用法示例。
在下文中一共展示了DaoFactory::ShiiresakiMst方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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_arr = $this->af->get('shiiresaki_cd_arr');
// 削除
$shiiresaki = DaoFactory::ShiiresakiMst();
try {
$shiiresaki->BeginTransaction();
$params = array('company_id' => $company_id);
if ($_REQUEST['del'] == 'all') {
$shiiresaki->Delete(' company_id = ? ', $params);
} else {
foreach ($shiiresaki_cd_arr as $shiiresaki_cd) {
$params['shiiresaki_cd'] = $shiiresaki_cd;
$shiiresaki->Delete(' company_id = ? and shiiresaki_cd = ? ', $params);
}
}
$shiiresaki->CommitTransaction();
} catch (Exception $e) {
$shiiresaki->AbortTransaction();
$this->logger->log(LOG_DEBUG, $e->getTraceAsString());
return array(500, $e->getMessage());
}
exit;
}
示例3: perform
/**
* 仕入先マスタのデータをJSON形式で返す
* @access public
* @return array 店舗マスタ
* @see Admin_ActionClass::perform()
*/
public function perform()
{
// 初期化
//$not_warehouse_id = $this->af->get('not_warehouse_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');
$start_page = ($page - 1) * $limit + 1;
$end_page = ($page - 1) * $limit + $limit;
//$not_warehouse_id = explode(',', urldecode($not_warehouse_id));
try {
$params = array('limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
// 一覧を取得
$list = DaoFactory::ShiiresakiMst()->shiiresakiMst_GetShiiresakiList($params)->fetchAll();
// ページ情報を設定
$pager = array('result_page' => $page, 'result_start_num' => ($page - 1) * $limit + 1, 'result_end_num' => ($page - 1) * $limit + $limit, '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);
}
示例4: check_shiiresaki_cd_exists
/**
* リクエストの仕入先がDBに登録されているかチェックする
* @param string $name フォーム名
*/
public function check_shiiresaki_cd_exists($name)
{
// 仕入先を取得
$params = array('shiiresaki_cd' => $this->form_vars['shiiresaki_cd']);
$shiiresaki = DaoFactory::ShiiresakiMst()->Retrieve(' shiiresaki_cd = ? ', $params);
// 仕入先が存在しない場合
if (empty($shiiresaki)) {
$this->ae->add($name, "入力された{form}は登録されていません", E_FORM_INVALIDCHAR);
}
}