public function deleteAction($id)
 {
     $id = $this->filter->sanitize($id, array("int"));
     $products = Finance::findFirst('id="' . $id . '"');
     if (!$products) {
         $this->flash->error("没有找到对应的记录");
         return $this->forward("products/index");
     }
     if (!$products->delete()) {
         foreach ($products->getMessages() as $message) {
             $this->flash->error((string) $message);
         }
         return $this->forward("products/search");
     } else {
         $this->flash->success("记录已删除");
         return $this->forward("products/index");
     }
 }