예제 #1
0
 public function statusmethodsupplyAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $methodModel = new MethodModel();
     $cdmethod = $this->_request->getParam("cdmethod");
     $status = $this->_request->getParam("activeStatus");
     $array = array();
     $methodModel->getAdapter()->beginTransaction();
     try {
         if (isset($cdmethod) && $status == '1') {
             $array['fgactive'] = '2';
         } else {
             if (isset($cdmethod) && $status == '2') {
                 $array['fgactive'] = '1';
             }
         }
         $methodModel->update($array, "cdmethod = {$cdmethod}");
         $methodModel->getAdapter()->commit();
     } catch (Exception $e) {
         $methodModel->getAdapter()->rollback();
     }
 }