Esempio n. 1
0
 function onInlineEdit($param)
 {
     try {
         $field = $param['field'];
         $key = $param['key'];
         $value = $param['value'];
         TTransaction::open('liger');
         $object = new Imovel($key);
         $object->{$field} = $value;
         $object->store();
         TTransaction::close();
         $this->onReload($param);
         new TMessage('info', "Record Updated");
     } catch (Exception $e) {
         // shows the exception error message
         new TMessage('error', '<b>Error</b> ' . $e->getMessage());
         // undo all pending operations
         TTransaction::rollback();
     }
 }