public function deletetypesAction($id)
 {
     $id = $this->filter->sanitize($id, array("int"));
     $Types = Types::findFirst('id="' . $id . '"');
     if (!$Types) {
         $this->flash->error("没找到对应下级类型");
         return $this->forward("producttypes/index");
     }
     if (!$Types->delete()) {
         foreach ($Types->getMessages() as $message) {
             $this->flash->error((string) $message);
         }
         return $this->forward("producttypes/search");
     } else {
         /* $this->flash->success("该下级类型已删除"); */
         $this->response->redirect("producttypes/search");
     }
 }