Exemplo n.º 1
0
                     }
                 }
             }
         }
     } catch (Exception $e) {
         $result = $e->getMessage();
         Tool::logger(__METHOD__, __LINE__, sprintf("数据保存失败: %s", $e->getMessage()), _LOG_ERROR);
     }
 } else {
     if ($dataType == "detail" && $module == "sort") {
         try {
             Tool::logger(__METHOD__, __LINE__, sprintf("action: %s", $action), _LOG_DEBUG);
             $sort = new Sort(_NONE);
             $sort->sortId = isset($_REQUEST["sortId"]) ? $_REQUEST["sortId"] : _NONE;
             if ($sort->sortId > 0) {
                 $sort = Sort::first($sort);
             }
             $sort->sortName = isset($_REQUEST["sortName"]) ? $_REQUEST["sortName"] : $sort->sortName;
             if ($action == "insert") {
                 $newId = Sort::insert($sort);
             } else {
                 if ($action == "update") {
                     Sort::update($sort);
                 } else {
                     if ($action == "delete") {
                         Sort::delete($sort);
                     }
                 }
             }
         } catch (Exception $e) {
             $result = $e->getMessage();