Changeset 20577


Ignore:
Timestamp:
2011/03/10 07:32:29 (13 years ago)
Author:
takashi
Message:

doRegisterをフックする拡張で、ユーザーへのメッセージを指定できるよう変更

File:
1 edited

Legend:

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

    r20538 r20577  
    115115            $this->arrErr = $this->lfCheckError($objFormParam); 
    116116            if (SC_Utils_Ex::isBlank($this->arrErr)) { 
    117                 $order_id = $this->doRegister($order_id, $objPurchase, $objFormParam); 
    118                 $this->setOrderToFormParam($objFormParam, $order_id); 
    119                 $this->tpl_onload = "window.alert('受注を編集しました。');"; 
     117                $message = '受注を編集しました。'; 
     118                $order_id = $this->doRegister($order_id, $objPurchase, $objFormParam, $message); 
     119                if ($order_id >= 0) { 
     120                    $this->setOrderToFormParam($objFormParam, $order_id); 
     121                } 
     122                $this->tpl_onload = "window.alert('" . $message . "');"; 
    120123            } 
    121124            break; 
     
    127130                $this->arrErr = $this->lfCheckError($objFormParam); 
    128131                if (SC_Utils_Ex::isBlank($this->arrErr)) { 
    129                     $order_id = $this->doRegister(null, $objPurchase, $objFormParam); 
    130                     $this->tpl_mode = 'edit'; 
    131                     $objFormParam->setValue('order_id', $order_id); 
    132                     $this->setOrderToFormParam($objFormParam, $order_id); 
    133                     $this->tpl_onload = "window.alert('新規受注を登録しました。');"; 
     132                    $message = '新規受注を登録しました。'; 
     133                    $order_id = $this->doRegister(null, $objPurchase, $objFormParam, $message); 
     134                    if ($order_id >= 0) { 
     135                        $this->tpl_mode = 'edit'; 
     136                        $objFormParam->setValue('order_id', $order_id); 
     137                        $this->setOrderToFormParam($objFormParam, $order_id); 
     138                    } 
     139                    $this->tpl_onload = "window.alert('" . $message . "');"; 
    134140                } 
    135141            } 
     
    547553     * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス 
    548554     * @param SC_FormParam $objFormParam SC_FormParam インスタンス 
     555     * @param string $message 通知メッセージ 
    549556     * @return integer $order_id 受注ID 
    550      */ 
    551     function doRegister($order_id, &$objPurchase, &$objFormParam) { 
     557     * 
     558     * エラー発生時は負数を返す。 
     559     */ 
     560    function doRegister($order_id, &$objPurchase, &$objFormParam, &$message) { 
    552561 
    553562        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
Note: See TracChangeset for help on using the changeset viewer.