Ignore:
Timestamp:
2011/02/16 14:12:30 (13 years ago)
Author:
coelacanth
Message:

#964 リファクタリング 共通処理をヘルパークラスへ移動

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php

    r20168 r20171  
    8080        SC_Utils_Ex::sfIsSuccess($objSess); 
    8181 
     82        $objDb = new SC_Helper_DB_Ex(); 
     83 
    8284        // パラメータ管理クラス 
    8385        $this->objFormParam = new SC_FormParam(); 
     
    8789        $this->objFormParam->setParam($_POST); 
    8890 
    89         $cnt = $this->lfGetBaseInfoCount(); 
    90  
     91        $cnt = $objDb->sfGetBasisCount(); 
    9192        if ($cnt > 0) { 
    9293            $this->tpl_mode = "update"; 
     
    118119            $arrCol = $this->objFormParam->getKeyList(); // キー名一覧を取得 
    119120            $col    = SC_Utils_Ex::sfGetCommaList($arrCol); 
    120             $arrRet = $this->lfGetBaseInfoData($col); 
    121             $this->objFormParam->setParam($arrRet[0]); 
     121            $arrRet = $objDb->sfGetBasisData(true, $col); 
     122            $this->objFormParam->setParam($arrRet); 
    122123        } 
    123124 
     
    132133    function destroy() { 
    133134        parent::destroy(); 
    134     } 
    135  
    136     /** 
    137      * 基本情報の登録数を取得する 
    138      * 
    139      * @return int 
    140      */ 
    141     function lfGetBaseInfoCount() { 
    142         $objQuery =& SC_Query::getSingletonInstance(); 
    143  
    144         return $objQuery->count("dtb_baseinfo"); 
    145     } 
    146  
    147     /** 
    148      * 基本情報のデータを取得する 
    149      * 
    150      * @return array 
    151      */ 
    152     function lfGetBaseInfoData($col) { 
    153         $objQuery =& SC_Query::getSingletonInstance(); 
    154  
    155         return $objQuery->select($col, "dtb_baseinfo"); 
    156135    } 
    157136 
Note: See TracChangeset for help on using the changeset viewer.